【问题标题】:Cache-Control public or private by default?Cache-Control 默认是公共的还是私有的?
【发布时间】:2019-12-20 18:17:40
【问题描述】:

如果我没有在 Cache-Control 标头中指定 publicprivate 指令,那么默认行为是什么?能不能被代理服务器缓存?

【问题讨论】:

    标签: caching cache-control


    【解决方案1】:

    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. 
    

    可以想象(可能?)有 野外的代理打破了这一点,但由于唯一的失败模式 可能会将公共资源视为私有资源,其后果应该是 在适度的性能影响之外最小化。你会有更多 代理的问题,比如缓存资源远远超出 您指定的最大年龄。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-02
    • 2016-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-10
    相关资源
    最近更新 更多