Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm hosting redmine with nginx + thin with static content caching

Question is: is it or is it not cached by the browser?

nginx caching config:

location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
    # Some basic cache-control for static files to be sent to the browser
    expires max;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";

here are response headers:

Request URL:http://redmine/javascripts/prototype.js?1251746896
Request Method:GET
Status Code:304 Not Modified

Request Headers
Cookie: <hiden>
If-Modified-Since:Mon, 31 Aug 2009 19:28:16 GMT
User-Agent: <someuseragent>
Query String Parameters

Response Headers
Cache-Control:max-age=315360000, public, must-revalidate, proxy-revalidate
Date:Fri, 09 Dec 2011 01:15:12 GMT
Expires:Thu, 31 Dec 2037 23:55:55 GMT
Last-Modified:Mon, 31 Aug 2009 19:28:16 GMT

Yet chromium audit still says:

The following resources are explicitly non-cacheable. Consider making them cacheable if possible:
share|improve this question
up vote 2 down vote accepted

Doesn't must-revalidate at least make the browser query to see if the resource has changed, even if it doesn't need to redownload the content? It will accept a "not changed" response but still have to query the server to get that rather than using the locally cached copy directly.

Chromium may be reporting this as meaning the content is not completely cacheable - try removing the revalidate related directives and see what difference that makes.

share|improve this answer
The browser should only recheck after the freshness period has passed, so no, it need not and should not query until then. Therefore the page is or should be cacheable and either Chrome's message or behavior is incorrect, according to the HTTP spec for must-revalidate. – Lawrence Dol Dec 2 '14 at 21:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.