2
votes

I am trying to improve the performance of my website by adding cache headers for static content.

So far, I can get the content to cache in Chrome and Internet Explorer, but not Firefox.

Here are the caching-related headers I'm supplying:

Cache-Control:private, max-age=1800

ETag:"809067e0179acb1:0"

Expires:Mon, 20 Dec 2010 21:35:10 GMT

(NOTE: ETag and Expires are variable; Expires is 30 minutes in the future)

I verified the behavior using Fiddler 2. Chrome and IE7 do not request the images, CSS, and JS after the first request, while Firefox requests them every time.

Is there any header I should supply to make Firefox cache these?

UPDATE 2010.12.22

I noticed the same behavior on most websites, including www.yahoo.com. Is there a way to force Firefox to cache?

1
(Of course, you are not pressing "reload" or "F5"?) Are you sure about the cache-control:private for static content? - Mitro
I am not doing reload (F5). I basically just click on a link that points to the same page. "cache-control:private" is what I see in the raw http headers. - frankadelic
These headers should work just fine with Firefox (assuming the site is HTTP and not HTTPS). Try clearing your FF cache and/or try the site from another machine. - EricLaw
Hmm... I tried it on an external machine and it worked fine. But inside my company network, Firefox doesn't cache. Both are version 3.6.13... strange, will need to do some research. - frankadelic
I have the same problem. My Cache-Control is 'max-age=1800, public' and is ignored by FF - Chris McCauley

1 Answers

0
votes

This would have occurred for SSL content, but it should no longer be the case. FireFox altered the way it caches with the resolution to Gecko bug 531801.

Now, SSL content is cached to disk regardless of the Cache-Control header.