Wednesday, 21 August 2013

Force Firefox to strictly follow cache-control

Force Firefox to strictly follow cache-control

I am setting this in my HTTP headers:
Cache-Control: public, max-age=3600
Date: Thu, 22 Aug 2013 02:44:50 GMT
Etag: 7223b29b5aab45749c8ce1b166
Expires: Thu, 22 Aug 2013 03:44:50 GMT
When the asset expires (html, js, or css), I want FireFox to make a
request to the server (preferably using If-None-Match). The issue is that
FireFox sometimes uses a cached copy even if it has expired (like when I
press the 'back' or 'forward' button).
How can I force Firefox to ALWAYS make a request for the expired asset?
Note: I could turn off all caching, but I don't want to do this. I want to
cache for an hour or maybe a day for performance (user experience), but
then I want to be able to push updates to Firefox.

No comments:

Post a Comment