Cache-Control 和 Expires 都没有的情况下的缓存

如果max-age和expires属性都没有,找找头里的Last-Modified信息。如果有,缓存的寿命就等于头里面Date的值减去Last-Modified的值除> 以10(注:根据rfc2626其实也就是乘以10%)

If an origin server does not explicitly specify freshness (e.g. using Cache-Control or Expires header) then a heuristic approach may be used.
In this case look for a Last-Modified header. If this header is present, then the cache’s freshness lifetime is equal to the value of the Date header minus the value of the Last-modified header divided by 10.

MDN
https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Caching_FAQ

RFC 7234
https://tools.ietf.org/html/rfc7234

Guess you like

Origin blog.csdn.net/MAIMIHO/article/details/110186876