rp.
rp.

Reputation: 17683

Confirming HTTP caching with Fiddler

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

Upvotes: 7

Views: 10255

Answers (5)

Martin Peck
Martin Peck

Reputation: 11564

Fiddler will definitely help with this. You'll either see the server respond with an HTTP 304 response (Not Modified - which tells the client 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.

Upvotes: 0

user2531498
user2531498

Reputation: 41

right click the URL in the fiddler and click properties, you can check the cach info in that popup under "WININET CACHE INFO"

Upvotes: 3

Cerebrus
Cerebrus

Reputation: 25775

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.

Upvotes: 0

Piskvor left the building
Piskvor left the building

Reputation: 92772

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.

Upvotes: 2

AnthonyWJones
AnthonyWJones

Reputation: 189457

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.

Upvotes: 5

Related Questions