How to prevent web browser to image caching.

June 16, 2010 | Filed Under PHP | Comments Off

The simple way to prevent image caching is to append time stamp with the name on image.

Ex-<img src=’image.jpg?<?php echo time() ?>’ />

In the  above code browser understand a new image at every call. But HTML parser understands“image.jpg” for every call.

Comments

Comments are closed.

© PHPInterviewQuestion.com 2009 - 2012

eXTReMe Tracker