Expires vs max-age, which one takes priority if both are declared in a HTTP response?

前端 未结 3 1914
无人及你
无人及你 2020-12-24 11:23

If a HTTP response that returns both Expires and max-age indications which one is used?

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


        
3条回答
  •  执念已碎
    2020-12-24 11:39

    But what does the rfc-6265 spec say like this?

    A cookie is "expired" if the cookie has an expiry date in the past.
    
    
    Finally, to remove a cookie, the server returns a Set-Cookie header
    with an expiration date in the past.
    

提交回复
热议问题