Forum Moderators: coopster

Message Too Old, No Replies

forcing a browser to re-cache images

         

dmmh

2:37 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



can it be done at all?

I dont want to add some generated time string to the image or something, I just want the browser to do a hard refresh so to speak if an image has changed. Now I know where Ill use this, so calling it isnt an issue, but I just dont know if it can be done :)

dreamcatcher

3:06 pm on Mar 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If its possible I`m guessing it will be a javscript issue as PHP cannot control the behaviour of the browser. You need to look at client side stuff, so maybe try in the javascript section?

ergophobe

4:40 pm on Mar 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Considering that with IE, I often have to clear the cache and then close the browserand restart to get images to refresh, I think this will be an uphill battle no matter which method you use. You can try some of the header and meta tags that control caching, but i don't think they'll help much for IE and images.

dmmh

4:50 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



ctrl-f5 always does the tick for me ;)
just wondered if I could force it somehow, without javascript if possible :)