Why does Firefox ignore the `304 Not Modified` status sent by the webserver?

For my site, Firefox 32.0 seems not to cache a CSS file of my Nikola 7.1.0 installation and ignores the 304 Not Modified response by the webserver. What also puzzles me, is that it sends the 2nd request with a different Accept: header.

Chrome 37.0 does not show this behaviour and only requests the file once.

The first HTTP request Firefox sends is:

GET /assets/css/all-nocdn.css HTTP/1.1
Accept: text/css,*/*;q=0.1
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en;q=0.5
Authorization: …
Cache-Control: max-age=0
Connection: keep-alive
Host: …
If-Modified-Since: Mon, 14 Jul 2014 09:12:55 GMT
If-None-Match: "2838446235"
Referer: …
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
HTTP/1.1 304 Not Modified
Content-Type: text/css
Date: Fri, 12 Sep 2014 07:18:02 GMT
ETag: "2838446235"
Last-Modified: Mon, 14 Jul 2014 09:12:55 GMT
Server: lighttpd/1.4.35
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Vary: Accept-Encoding

And the next HTTP request is:

GET /assets/css/all-nocdn.css HTTP/1.1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en;q=0.5
Authorization: …
Cache-Control: no-cache
Connection: keep-alive
Host: …
Pragma: no-cache
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Encoding: gzip
Content-Length: 22700
Content-Type: text/css
Date: Fri, 12 Sep 2014 07:26:42 GMT
ETag: "2838446235"
Last-Modified: Mon, 14 Jul 2014 09:12:55 GMT
Server: lighttpd/1.4.35
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
Vary: Accept-Encoding
…

(I actually replayed this using HTTPie, because Firefox does not allow to copy the server response as a whole. Copying the request headers is possible by clicking "Edit and Resend".)

What could be reasons for that behaviour? Does Firefox offer a way to see the reason for a HTTP request? (What Chrome calls "initiator".)

Please have a look at my Screenshot of the Network section of the Firefox Developer Toolbar to see an overview of all requests in the timeline:
Screenshot of the Network section of the Firefox Developer Toolbar

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like