gpt4 book ai didi

http - Expires vs max-age,如果两者都在 HTTP 响应中声明,哪个优先?

转载 作者:可可西里 更新时间:2023-11-01 15:04:16 26 4
gpt4 key购买 nike

如果 HTTP 响应同时返回 Expires 和 max-age 指示使用哪一个?

Cache-Control: max-age=3600
Expires: Tue, 15 May 2008 07:19:00 GMT

考虑到每个指的是不同的时间点。

最佳答案

看到这个答案:

Difference between three .htaccess expire rules

If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header, even if the Expires header is more restrictive. This rule allows an origin server to provide, for a given response, a longer expiration time to an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache. This might be useful if certain HTTP/1.0 caches improperly calculate ages or expiration times, perhaps due to desynchronized clocks.

关于http - Expires vs max-age,如果两者都在 HTTP 响应中声明,哪个优先?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7549177/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com