如何判断此Leverage浏览器缓存是否已启用?

时间:2011-10-03 15:04:14

标签: .htaccess ubuntu mod-expires

我正在尝试在我的网站上的images / js / css ext ..设置过期日期,因为我在一个工具中看到我使用Page Speed它将有助于提高性能:

The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources:

http://somesite.com/images/chat/footer_btn_chat_on.png (expiration not specified)
http://somesite.com/images/footer.jpg (expiration not specified)
http://somesite.localhost/inc/cache/all.js (expiration not specified)

所以我把这个添加到了htaccess并刷新了页面并且仍然是(未指定过期):

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html "access plus 2 days"
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days"
ExpiresByType application/x-javascript "access plus 60 days"
ExpiresByType text/css "access plus 60 days"
ExpiresByType image/x-icon "access plus 360 days"
</IfModule>

我需要打开任何东西,还是有办法让它工作?

0 个答案:

没有答案