V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
httpbin - 协议调试工具
httpstatuses - 协议状态码查询
httpie - cURL-like tool for humans
Fiddler
Livid
V2EX  ›  HTTP

如果 header 中已经设置了 Cache-Control 头,那么其实也可以不用设置 Expires?

  •  
  •   Livid · 2012-04-25 00:46:20 +08:00 · 3504 次点击
    这是一个创建于 4356 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Expires 在哪些情况下是必须的呢?
    2 条回复    1970-01-01 08:00:00 +08:00
    fsw90628
        1
    fsw90628  
       2012-04-25 00:50:14 +08:00   ❤️ 3
    推荐:
    https://developers.google.com/speed/docs/best-practices/caching

    引用:
    It is redundant to specify both Expires and Cache-Control: max-age, or to specify both Last-Modified and ETag.
    luser
        2
    luser  
       2012-04-25 01:11:05 +08:00
    Expires支持更广泛 印象中cache-control是http1.1新加的 详见rfc2616
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5443 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 08:51 · PVG 16:51 · LAX 01:51 · JFK 04:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.