Cloudflare CDN标头cf-cache-status:从页面

时间:2017-01-24 08:50:21

标签: javascript caching http-headers cloudflare

我正在尝试通过Cloudflare CDN从Amazon S3加载图像。通过JavaScript响应标头src<img />标记添加cf-cache-status时会返回MISS,但是当我在新标签页中打开图片时,它应该是HIT,因为它应该是(通过CDN缓存工作)。

请求标头的区别在于

通过JavaScript获取图片时:

accept:image/webp,image/*,*/*;q=0.8
referer:https://example.com/

在新标签页中打开时:

accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
cache-control:max-age=0
if-modified-since:Sun, 15 Jan 2017 15:57:40 GMT
if-none-match:"62d2f51d08bd490d403206a37bec9c15"
upgrade-insecure-requests:1

如何从我的网页上制作HIT

0 个答案:

没有答案