...

View Full Version : Browser keep the image when the source is changed



cdzhang
06-14-2012, 06:21 AM
Hi, I have a strange problem!
I put an img in the browser say <img src='abc.png'>.
When I change the image (keep the same name) and then refresh the window. The browser displayed the original image. How to let the browser display the new image?

abduraooft
06-14-2012, 07:06 AM
How to let the browser display the new image?
It's due to the caching of files by the browser. You may solve this by a hard refresh (Ctrl+F5). Or simple add different numbers or string at the end of file name, like

<img src='abc.png?1'>
<img src='abc.png?2'>

cdzhang
06-14-2012, 09:13 AM
Thank you very much, this works pretty well! use let $_SESSION['logo_tail'] add 1 every the time the user refresh the window.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum