开发者

Google Chrome; refresh doesn't send If-Modified-Since header

As I am currently developing a website that simply must be able to perform more or less flawlessly under a lot of stress and switching from an automated test sce开发者_StackOverflow社区nario, I would try the simple press-and-hold-F5-for-several-seconds-in-my-favorite-browser, and here I found an odd observation with Google Chrome:

If you do the above, Chrome skips sending the If-Modified-Since header, and the webserver is forced to fetch the page you want to display, resulting in a status code 200 instead of the expected 304.

In IE8 (and probably earlier versions also), this problem is not present.

Try this simple page: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html, and then investigate the page closely with Fiddler; odd huh?

My question is; is this by design, or a bug from Google?


This may be a by-design issue. Browsers will often send different requests when refreshing; for instance, try hitting CTRL+F5 in IE and you should see that IE then makes an unconditional HTTP request.

Are you sending proper HTTP-caching directives on your responses such that their freshness need not be verified? http://www.fiddler2.com/redir/?id=httpperf


Are you doing Shift-F5 or Ctrl-F5? If so it would appear that that is by design. Otherwise it could very well be a bug.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜