Prevention of image caching
Posted: Fri Dec 08, 2006 5:10 am
Not sure which forum this belongs in, code, client side or graphics!
I know there are various ways of controlling page caching, but could anyone tell me one that prevents image caching in browsers?
I have a logo upload script which resizes and renames a file to the id of the database entry, so when you upload a new image it overwrites the old 26.jpg for instance. The trouble is, IE still displays the old 26.jpg because it reloads it from its cache and not the server.
A second page refresh usually resolves it but it shouldn't be necessary.
I know there are various ways of controlling page caching, but could anyone tell me one that prevents image caching in browsers?
I have a logo upload script which resizes and renames a file to the id of the database entry, so when you upload a new image it overwrites the old 26.jpg for instance. The trouble is, IE still displays the old 26.jpg because it reloads it from its cache and not the server.
A second page refresh usually resolves it but it shouldn't be necessary.