views:

375

answers:

4

How can I use Fiddler to confirm that HTTP caching is working? Is there another better way?

+1  A: 

You can confirm caching by having a page fetch a resource and note that no request for the resource appeared in Fiddler. I can't think of a better way to do it. Works for me.

AnthonyWJones
A: 

Browse the site through the Fiddler as proxy. In each response details, there's a tab "Caching". This shows useful info about the response headers - e.g. what the different Cache-Control and Expires values mean.

Piskvor
A: 

I think the best way is to use the method demonstrated within most caching tutorials - Have a label on the page that displays the current server time. If the value is cached, you will not see it update with subsequent page refreshes until the cache is regenerated.

If your requirement is more complex (you need to use Fiddler), Anthony's suggestion is the one I have used successfully in the past.

Cerebrus
A: 

Fiddler will definatley help with this. You'll either see the server respond with an HTTP 302 response (to say that the cached item is still valid) or for content that has it's web expiry set correctly, you won't see a request at all.

In fact, you'll find Firefox plus FireBug will do this for you too.

Martin Peck