max-age,no-Cache,必须在Cache-Control Header上重新验证,这在这里需要预先设定?

时间:2014-12-16 06:26:07

标签: http caching http-headers response-headers

Cache-Control:max-age = 86400,no-store,must-revalidate,no-cache

这是服务器为JS文件设置的响应标头。

是否意味着在重新验证之前,响应缓存了86400秒?

以上哪一个优先,什么是resiult?

1 个答案:

答案 0 :(得分:1)

看起来no-cache优先于所有。 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/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1

它还说" The max-age directive on a response implies that the response is cacheable (i.e., "public") unless some other, more restrictive cache directive is also present." 请参阅http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3

以上所有内容均适用于HTTP / 1.1。

相关问题