【问题标题】:Cache-Control no cacheCache-Control 无缓存
【发布时间】: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


【解决方案1】:

如果我们知道这里的具体域名会有所帮助,我也建议直接使用 CloudFlare 开一张支持票。然后,我们的支持团队可以检查您的特定帐户设置,但出于明显的隐私原因,无法在此处讨论这些设置。

免责声明:我在 CloudFlare 工作。

【讨论】:

    猜你喜欢
    • 2015-12-01
    • 2022-01-24
    • 2015-10-19
    • 1970-01-01
    • 2020-03-26
    • 2018-04-04
    • 2022-11-17
    • 2018-03-14
    • 2016-08-14
    相关资源
    最近更新 更多