Categories
code programming

HTTP no-cache and standards

In the interests of keeping posting something, I’m putting this down as a reminder to myself and others. Firefox and IE handle no-cache responses differently, such that sometimes Firefox will save a page in the cache when IE doesn’t. Specifically, Firefox only respects the no-cache when the page is served via SSL ( https://bugzilla.mozilla.org/show_bug.cgi?id=139541 ) which follows RFC2616, whereas IE always respects the no-cache header. For cross-browser compatibility, the no-store header should be used instead, which will be respected irrespective of SSL status.

If you’re using ASP.Net, the answer is as simple as:
Response.Cache.SetNoStore();
(Thanks to http://www.sriramkrishnan.com/blog/2007/06/firefox-and-ie-deal-with-no-cache.html )

Advertisement