【发布时间】:2016-08-31 22:35:08
【问题描述】:
我收到了来自http://web-sniffer.net/ 的以下信息:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
我使用 Cloudflare 和自定义过期规则进行缓存,但在浏览器中它们似乎没有缓存。
为什么会这样?
规则:
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
【问题讨论】:
-
您可以发布您的
.htaccess内容吗? -
是的,对不起。我忘了他们
标签: .htaccess caching cloudflare