Apache 标头缓存控制问题

Apache 标头缓存控制问题

我网站的 apache 配置中有以下行:

Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"

网站的一部分会生成可以下载的 CSV,但在 IE 中,如果配置中出现此行,IE 会出现以下错误:

Internet Explorer cannot download admin/ from wwww.domain.com
Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found.  Please try again later.

这是 IE 的一个已知问题吗?有已知的修复方法吗?或者有没有办法只在某些页面上实现缓存控制?

如果我注释掉该行,它就可以在 IE 中正常运行。

我可以将类似的内容添加到需要它的页面的 < head > 中而不是 apache 配置行中吗?

<meta http-equiv="CACHE-CONTROL" content="NO-STORE, NO-CACHE, MUST-REVALIDATE, POST-CHECK=0, PRE-CHECK=0" />

答案1

看起来是“no-cache”标头导致了问题:

您可以设置 Expires 标头吗?

相关内容