mar*_*lin 5 caching cache-control
如果我不指定public或private在指令中Cache-Control标头中默认行为是什么?它是否可以被代理服务器缓存?
在webmasters.stackexchange.com上找到了答案。引用:
请参阅http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.3:
Run Code Online (Sandbox Code Playgroud)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.可以想象(可能?),野外存在一些代理可以打破这一点,但由于唯一的失败模式可能是将公共资源视为私有资源,因此除了适度的性能影响之外,后果应该是最小的。对于代理,您会遇到更多问题,这些代理会执行远远超出指定最大期限的缓存资源之类的操作。