小提琴手显示缓存命中? [英] Fiddler showing cache hits?

查看:84
本文介绍了小提琴手显示缓存命中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想检查我的网站HTTP缓存是否正常工作,尤其是自从移至CDN以来.

I just wanted to check if my HTTP caching for my website is working especially since I moved to a CDN.

现在,我同时使用了Fiddler和Firebug,并且看到的是每次我导航到页面时,对页面上所有脚本和图像的请求.响应码为200.

Now I used both Fiddler and Firebug and what I am seeing is that requests for ALL scripts and images on my page every time I navigate to it. Response code is 200.

如果我在Chrome中打开页面,则开发人员工具也会向我显示所有这些请求,但Chrome还会告诉我这些请求是由缓存提供的. Chrome请求未在Fiddler中列出(而FF和IE请求则在其中).

If I open the page in Chrome, the developer tools also show me all these requests but Chrome also tells me that the requests are served from the Cache. Chrome requests are not listed in Fiddler (while FF and IE requests are).

我最初的假设是,如果Firefox或Internet Explorer从其缓存中获取文件,则该请求根本不会在Fiddler中显示.

My original assumption was that if Firefox or Internet Explorer get a file from their cache that request wouldn't show up at all in Fiddler.

我检查了我的缓存标题,由于Chrome的行为完全符合我的预期,我在问自己关于Fiddler的假设是否错误. Fiddler启动时,FF/IE的行为是否有所不同? Fiddler是否显示缓存命中?

I checked my caching headers and since Chrome behaved exactly like I expected I am asking myself if my assumption about Fiddler was wrong. Are FF/IE behaving differently when Fiddler is started? Is Fiddler showing cache hits?

推荐答案

作为网络代理,Fiddler无法显示来自缓存的任何内容.如果您在Fiddler中看到一个请求,则该请求是通过网络发送的.

As a network proxy, Fiddler is not able to show anything that comes out of the cache. If you see a request in Fiddler, then that request was sent over the wire.

要记住的一件事是,如果您刷新页面(例如,使用按钮或F5键),则可以绕过缓存;参见 http://blogs.msdn.com/b/ieinternals/archive/2010/07/08/technical-information-about-conditional-http-requests-and-the-refresh-button.aspx

One thing to keep in mind is that if you're refreshing the page (e.g. with the button or F5) then the cache can be bypassed; see http://blogs.msdn.com/b/ieinternals/archive/2010/07/08/technical-information-about-conditional-http-requests-and-the-refresh-button.aspx

这篇关于小提琴手显示缓存命中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆