简体   繁体   English

如何将缓存标头添加到Cloudfront?

[英]How to add Cache headers to Cloudfront?

I'm using cloudfront with no special settings. 我正在使用无特殊设置的Cloudfront。 when I run webpagetest, it gives me an "F" for static content. 当我运行webpagetest时,它给我的静态内容是“ F”。 Is there any way to get cloudfront to put out the correct cache headers? 有什么办法让Cloudfront分发正确的缓存头?

Here are my results from a page that has cloudfront. 这是我从具有Cloudfront的页面获得的结果。 I'm not sure this is still live 我不确定这是否仍然有效

http://www.webpagetest.org/result/150207_29_PAF/1/details/ http://www.webpagetest.org/result/150207_29_PAF/1/details/

You need to add these headers (max-age or expires) on your origin. 您需要在原始位置添加这些标头(最大年龄或过期)。 It is the origin that decides how long objects should stay in cache 它是决定对象应在缓存中保留多长时间的原点

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

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