I need to make sure, via javascript or otherwise, that browsers are getting the latest version of images on my web pages. Currently the images are simple html <img src="">
and I am using the html header to prevent caching: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
. When testing this in Firefox, the images are being cached and even after refreshing despite the page not being cached. The new page sometimes gets the old image. I have not been changing the name of the images in order to retain the same links to the images.
Asked
Active
Viewed 183 times
0

fny
- 31,255
- 16
- 96
- 127
-
Looks like duplicate of - [This Question][1] [1]: http://stackoverflow.com/q/4076634/1823389 – Moazzam Khan Sep 05 '13 at 15:45
-
2The easiest way to fight with cash, to add link attribute to image href e.g: src="/imgs/imgNumber1.png?1211212" – Gena Moroz Sep 05 '13 at 15:45
-
This may help: http://stackoverflow.com/questions/6782918/preventing-images-being-cached-in-the-browser – TheNickmaster21 Sep 05 '13 at 15:47