Chrome - 为什么它发送if-modified - 自请求以来? [英] Chrome - why is it sending if-modified-since requests?
问题描述
我有一个有很多小图片(图标)的页面。与chrome一起使用时,每次页面重新加载时,chrome都会通过if-modified-since标头向服务器请求每个图标。
所有图标都以expires和max - 标头。 Firefox加载缓存中的图片。
为什么chrome会这样做,我该如何防止它?
谢谢
$ b
'Cache -Control'始终设置为'max-age = 0',不管是否按Enter,f5或ctrl + f5。除非您启动Chrome并输入url并按回车键。
http://techblog.tilllate.com / 2008/11/14 / clientside-cache-control /
I have a page with lots of small images (icons). When used with chrome, each time the page is reloaded, chrome requests each icon from the server with if-modified-since header.
All icons are served with expires and max-age headers. Firefox loads images from its cache.
Why is chrome doing that and how can I prevent it?
Thanks
Have you checked the request headers?
"‘Cache-Control’ is always set to ‘max-age=0′, no matter if you press enter, f5 or ctrl+f5. Except if you start Chrome and enter the url and press enter."
http://techblog.tilllate.com/2008/11/14/clientside-cache-control/
这篇关于Chrome - 为什么它发送if-modified - 自请求以来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!