简体   繁体   English

仅浏览器缓存控制 - 不是CDN

[英]Browser-only cache-control - Not CDN

I'd like to apply this to browsers: 我想将它应用于浏览器:

header('Cache-Control: max-age=3600');

But apply this to my CDN: 但将此应用于我的CDN:

header("Cache-Control: no-cache");

In other words I want the CDN to treat it as dynamic content but browsers to still store the response in their local cache. 换句话说,我希望CDN将其视为动态内容,但浏览器仍然将响应存储在其本地缓存中。 Is there any standard way of doing this? 这样做有什么标准方法吗?

You can do that with 你可以这样做

Cache-Control: private, max-age=3600

So that an eventual CDN/intermediate proxy is bypassed. 这样就绕过了最终的CDN /中间代理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM