[英]max-age, no-Cache,must-revalidate on Cache-Control Header, Which takes predence here?
Cache-Control : max-age=86400, no-store, must-revalidate, no-cache 缓存控制:max-age = 86400,无需存储,必须重新验证,无需缓存
This is a response header set by the server for a JS file. 这是服务器为JS文件设置的响应标头。
Does it mean the response is cached for 86400 seconds before revalidating?. 这是否意味着响应在重新验证之前已缓存了86400秒?
Which of the above one takes precedence and what is the resiult?. 以上哪一个优先,结果如何?
Looks like no-cache is give precedence over all. 看起来no-cache优先于所有。 HTTP1.1 specification says "
If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server.
" Refer http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1 HTTP1.1规范说:“
If the no-cache directive does not specify a field-name, then a cache MUST NOT use the response to satisfy a subsequent request without successful revalidation with the origin server.
”请参阅http://www.w3。 .ORG /协议/ RFC2616 / RFC2616-sec14.html#sec14.9.1
It also says " The max-age directive on a response implies that the response is cacheable (ie, "public") unless some other, more restrictive cache directive is also present.
" Refer http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3 它还说,“
The max-age directive on a response implies that the response is cacheable (ie, "public") unless some other, more restrictive cache directive is also present.
”参见http://www.w3.org/Protocols /rfc2616/rfc2616-sec14.html#sec14.9.3
All the above are for HTTP/1.1 . 以上所有都是针对HTTP / 1.1的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.