We found that Firefox (at least v3) and Safari do not cache images specified in the css file. Images are cached, but they are never updated, even if you change them on the server. Once Firefox has an image in the cache, it never checks to see if it has changed.
Our css file looks like this:
div
background:
...
}
The problem is that if we change the image of newsitem_background.jpg, all Firefox users will still get the old image, unless they explicitly refresh the page. IE, on the other hand, detects that the image has changed and reloaded it automatically.
Is this a known issue? Any workarounds? Thanks!
EDIT: decision not to press F5. I can do it. But our customers just go to our website and get the old outdated graphics. How do they know that they will need to press F5?
I installed Firebug and confirmed that I already suspected: Firefox just doesn’t even try to get the images referenced by the css file to see if they have changed. When you press F5, it checks all the images, and the web server responds perfectly to 304, except for those that have been changed, where it answers 200 OK.
So, is there a way to get Firefox to automatically update the image referenced by the css file? Am I not the only one with this problem?
EDIT2: I tested this with localhost and the image response does not contain any caching information, this is:
Server Microsoft-IIS/5.1
X-Powered-By ASP.NET
Date Tue, 14 Oct 2008 11:01:27 GMT
Content-Type image/jpeg
Accept-Ranges bytes
Last-Modified Tue, 14 Oct 2008 11:00:43 GMT
Etag "7ab3aa1aec2dc91:9f4"
Content-Length 61196
EDIT3: , , , Firefox , ( ).