Firefox Caching Bug
Kevin Day, August 17th, 2008For a while I thought I had a bug with my Ajax fantasy football mock draft program, but it turns out the bug was in Firefox 3 instead.
The bug is that Firefox 3 doesn’t handle caching properly. If you don’t want it to cache a page you have to specify your headers in a specific order, otherwise it will cache it even if the headers correctly specify not to. More info here and here.
This affected me because I use a periodic Ajax GET request to the same url in a live draft application. I reply with no-cache headers so that the GET request polls the server every time. When Firefox 3 pulled the request from the cache instead, it would miss a lot of updates and made the application appear to freeze up.
To work around the bug, I’m just appending a timestamp to the end of every request. I feel that’s better than using FF3’s specific ordering of header info because I don’t want to have to worry that they may change their magical ordering. It’s not much work to get around the bug, but it was difficult to pinpoint in the first place.

Would be good if you gave a little more info/reference about WHAT the spcific order of the headers is.
- MM, May 8th, 2009, 12:42 pmMM - I linked to the bug report that specifies the order the headers need to be in. Here it is again:
https://bugzilla.mozilla.org/show_bug.cgi?id=183470#c22
- Kevin Day, May 11th, 2009, 4:03 pmLeave a Reply
Enclose code in <pre></pre> tags