【发布时间】:2011-07-07 04:56:03
【问题描述】:
YSlow
我正在使用雅虎的 YSlow 测试我的一些网站,并注意到以下评论:Specify an expiration at least one week in the future for the following resources
我的 .htacces 文件包含以下代码:
ExpiresActive On
ExpiresDefault "access plus 1 day"
这是最好的方法吗?以及为什么 YSlow 建议您将缓存设置至少一周?
【问题讨论】:
-
你可能想看看 HTML5 Boilerplate 项目,它有一个注释相当好的 .htaccess 文件,其中包含与缓存相关的指令github.com/paulirish/html5-boilerplate/blob/master/.htaccess
标签: php html .htaccess cache-control yslow