【问题标题】:How to tell IE6 not to cache the html/page?如何告诉 IE6 不要缓存 html/页面?
【发布时间】:2013-06-13 23:25:55
【问题描述】:

我正在使用PHP使用以下代码,

header("Cache-control: private");
header('Expires: Mon, 26 Jul 2010 05:00:00 GMT');
header("Last-Modified: Mon, 26 Jul 2010 05:00:00 GMT");
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

在所有浏览器中它似乎都可以正常工作,但在 IE6 中却不行,除非我按 Ctrl+F5 强制刷新页面。如何在 IE6 中停止缓存?

【问题讨论】:

  • 人们还在关心IE6吗?哇...
  • 你试过
  • @Kolink - 你会惊讶于拒绝放弃久经考验的软件的企业数量。 “如果我不能说它坏了,我'不会'修复它”
  • 也许我们应该向他们展示它因不支持而破产了,然后呢? :D
  • @Kolink :哈哈,是的,因为它有很多用户。

标签: html internet-explorer-6 http-caching


【解决方案1】:
【解决方案2】:

这是一个错误。看这里:

尽管您使用“Cache-Control: no-cache”,但始终会缓存带有“Content-Encoding: gzip”的内容 http://support.microsoft.com/kb/321722

禁用 gzip 压缩几乎可以修复它。

您可以仅对匹配“MSIE 6”的用户代理禁用它。

【讨论】:

    猜你喜欢
    • 2020-01-27
    • 1970-01-01
    • 1970-01-01
    • 2011-02-11
    • 1970-01-01
    • 2012-08-20
    • 1970-01-01
    • 1970-01-01
    • 2021-06-04
    相关资源
    最近更新 更多