Bjo*_*orn 0 apache yslow mod-expires http-headers
尝试将ExpiresDefault ExpiresByType添加到我的网站上的内容,以便缓存它.我在Javascript,CSS和图像的URL(路径中的修订号)中使用cachebusting,这样我就可以将这些mimetypes设置为永久.我在apache httpd中设置了以下规则:
ExpiresActive On
ExpiresDefault "access plus 1 minutes"
ExpiresByType image/gif "access plus 10 years"
ExpiresByType image/png "access plus 10 years"
ExpiresByType image/jpeg "access plus 10 years"
ExpiresByType image/jpg "access plus 10 years"
ExpiresByType text/javascript "access plus 10 years"
ExpiresByType text/css "access plus 10 years"
Run Code Online (Sandbox Code Playgroud)
然后,当我访问我的网站http://karmerd.com并使用httplive标题来查看标题时,我得到了我认为应该是正确的exps for css:Expires:Sun,03 Feb 2019 17:52:48 GMT
但我使用雅虎的Yslow firebug扩展,它仍然给我一个不使用Expires的F!难道我做错了什么?我也在我的网站上使用gravatars,但他们有Expires设置.好像一切都过期了.是Yslow还是我?
| 归档时间: |
|
| 查看次数: |
3080 次 |
| 最近记录: |