铬审计说,它不caching静态内容,但标题设置 – 谁错了?

我正在用nginx + thin与静态内容caching托piperedmine

问题是:是或不是由浏览器caching?

nginxcachingconfiguration:

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"; } 

这里是响应标题:

 Request URL:http://redmine/javascripts/prototype.js?1251746896 Request Method:GET Status Code:304 Not Modified Request Headers Accept:*/* Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-GB,en-US;q=0.8,en;q=0.6 Cache-Control:max-age=0 Connection:keep-alive Cookie: <hiden> Host:redmine If-Modified-Since:Mon, 31 Aug 2009 19:28:16 GMT Referer:http://redmine/issues/ User-Agent: <someuseragent> Query String Parameters 1251746896: Response Headers Cache-Control:max-age=315360000, public, must-revalidate, proxy-revalidate Connection:keep-alive 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 Pragma:public Server:nginx/0.7.67 

然而铬审计仍然说:

 The following resources are explicitly non-cacheable. Consider making them cacheable if possible: 

不必must-revalidate至less使浏览器查询来查看资源是否已经改变,即使它不需要重新下载内容? 它将接受“未更改”的响应,但仍然需要查询服务器来获取,而不是直接使用本地caching副本。

铬可能会报告这意味着内容不能完全caching – 尝试删除重新validation相关的指令,看看有什么区别。