【发布时间】:2019-12-20 18:17:40
【问题描述】:
如果我没有在 Cache-Control 标头中指定 public 或 private 指令,那么默认行为是什么?能不能被代理服务器缓存?
【问题讨论】:
标签: caching cache-control
如果我没有在 Cache-Control 标头中指定 public 或 private 指令,那么默认行为是什么?能不能被代理服务器缓存?
【问题讨论】:
标签: caching cache-control
在webmasters.stackexchange.com 上找到了这个问题的答案。引用:
见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 (i.e., "public") unless some other, more restrictive cache directive is also present.可以想象(可能?)有 野外的代理打破了这一点,但由于唯一的失败模式 可能会将公共资源视为私有资源,其后果应该是 在适度的性能影响之外最小化。你会有更多 代理的问题,比如缓存资源远远超出 您指定的最大年龄。
【讨论】: