httpbin - 协议调试工具
httpstatuses - 协议状态码查询
httpie - cURL-like tool for humans
Fiddler
logic3579
V2EX  ›  HTTP

服务端响应 Cache-Control 主机头的值为 no-cache 时,缓存机制是怎么样的?

  •  
  •   logic3579 · Sep 23, 2020 · 2570 views
    This topic created in 2060 days ago, the information mentioned may be changed or developed.

    服务端响应 Cache-Control 主机头的值为 no-cache 时,缓存机制是怎么样的?

    是不缓存吗?或是不缓存头部信息,还是不缓存响应内容。

    如果在 CDN 上,缓存过期的时候,响应头跟响应内容是同时从源站更新吗?

    2 replies    2020-10-02 09:56:38 +08:00
    Ptu2sha
        1
    Ptu2sha  
       Sep 23, 2020
    百度解决不了?
    eudore
        2
    eudore  
       Oct 2, 2020
    no-cache 回缓存数据在本地,但是在下一次请求这个资源的时候,回带上这个缓存数据元数据( etag last-modify )信息去请求;服务端会验证元数据,如果和现有数据相同则返回状态码 304 和空 body,客户端就回使用本地的缓存数据,如果服务端验证元数据不同,则返回状态码 200 和 body 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1028 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:36 · PVG 02:36 · LAX 11:36 · JFK 14:36
    ♥ Do have faith in what you're doing.