【问题标题】:Is there any evidence that browsers ignore Cache-Control and Max-Age headers?是否有任何证据表明浏览器会忽略 Cache-Control 和 Max-Age 标头?
【发布时间】:2013-04-16 18:12:39
【问题描述】:

我从几个不同的来源听说浏览器有时会忽略缓存标头,而是使用陈旧的内容。但是,我从未真正观察到这一点。

浏览器有时会忽略有效的缓存标头是真的吗?曾经是真的吗?

您能否给我任何示例情况,其中浏览器会忽略 Cache-control: no-cache 标头或类似内容,而是给用户提供过时的结果?

【问题讨论】:

    标签: caching browser cache-control http-caching


    【解决方案1】:

    您可能面临的主要问题之一不是浏览器,而是浏览器正在使用的代理。

    "must-revalidate: Some proxies can be configured to ignore the Expires and maxage. 
    This keyword forces them to always act like the resource was expired.
    proxy-revalidate: Same as must-revalidate, but only for proxies.
    s-maxage: Same as maxage, but only for proxies."
    

    来源:http://www.tommylacroix.com/2008/07/17/http-caching-basics/

    此外,由于缓存控制指定在 X 时间过去之前不应重新验证内容,浏览器可能会提供陈旧的内容。

    【讨论】:

      猜你喜欢
      • 2012-06-30
      • 2020-04-04
      • 2014-07-31
      • 1970-01-01
      • 2011-12-08
      • 2021-04-15
      • 1970-01-01
      • 2020-08-11
      • 2015-04-08
      相关资源
      最近更新 更多