YSlow – Fs过期和压​​缩,但响应标题显示正确

我只是把一个中等繁忙的wordpress网站从共享主机移动到一个512MB内存的VPS服务器,并试图性能调整之前,我分手,并购买另一个VPS来减轻负载。 因此,我正在为nginx寻找性能提示,并碰到了“gzip”和“expires max”。 从我看到的一些例子和修补,我做了以下的改变,他们似乎工作正常,但YSlow不同的说法。

# Entry in nginx vhost.conf location /wp-content { alias /home/src/web/app/melikedev/current/code/web/wp-content/; expires max; add_header Pragma public; add_header Cache-Control "public"; } 

并通过curl从另一台服务器进行testing:

 mpurcell@service1 ~ $ -> curl -I -H "Accept-Encoding: gzip, deflate" -L http://melikedev.com/wp-content/plugins/sociable/css/sociable.css?ver=3.4.2 HTTP/1.1 200 OK Server: nginx/1.0.15 Date: Fri, 18 Jan 2013 04:58:34 GMT Content-Type: text/css Last-Modified: Sat, 29 Dec 2012 08:50:41 GMT Connection: keep-alive Expires: Thu, 31 Dec 2037 23:55:55 GMT Cache-Control: max-age=315360000 Pragma: public Cache-Control: public Content-Encoding: gzip 

根据响应标题,expires标题出现,内容被压缩,但是YSlow仍然给出了两个F。 我错过了什么? 还是YSlow错了?

– 更新 –

Yslow报告了28个静态组件,其中有些是我无法控制的Google AdSense资产,但是对于那些我控制的组件,我希望他们能够按照vhost.conf文件中的指令工作。 我列出了Yslow仍然抱怨的一个组件,以及响应头文件。

 There are 28 static components without a far-future expiration date. (no expires) http://melikedev.com/wp-content/plugins/sociable/js/sociable.js?ver=3.4.2 .... 

响应标题:

 mpurcell@service1 ~ $ -> curl -I -H "Accept-Encoding: gzip, deflate" http://melikedev.com/wp-content/plugins/sociable/js/sociable.js?ver=3.4.2 HTTP/1.1 200 OK Server: nginx/1.0.15 Date: Sat, 19 Jan 2013 00:28:24 GMT Content-Type: application/x-javascript; charset=utf-8 Last-Modified: Sat, 29 Dec 2012 08:50:42 GMT Connection: keep-alive Expires: Thu, 31 Dec 2037 23:55:55 GMT Cache-Control: max-age=315360000 Pragma: public Cache-Control: public Content-Encoding: gzip 

有趣的是,我第一次发布的CSS文件的响应标题没有显示在Yslow报告中,也许Yslow不喜欢版本控制js文件?