PDA

View Full Version : Browser does not cache resources after restart



nil5286
Apr 11, 2012, 12:10 PM
This is more a general caching question.

In my project I have pages with a couple ext.net 2.0 beta controls with asp.net-mvc3/razor

So for these pages, from the data I gather in firebug, I think that the browser isn't caching the ext.axd resource files after it is restarted.

This is what I see:

Start Firefox, goto my page
All requests show 200 OK
If I press F5, I see all the requests as 304 Not Modified
Now, if I restart the browser, it goes back to Http 200 responses.

Is browser NOT caching my resources? Is there a setting or config I can employ for it to cache my resources across browser sessions?

This is what firebug looks like:

1. When I first start:
4094

2. When i press F5 i see:
4095

This is what an individual request looks like:
4096

When I restart the browser, I go back to (1). I get 200OK everywhere.

(1) Are the resources being cached? (2) Is there something I can do to cache it?

Vladimir
Apr 11, 2012, 12:31 PM
As you can notice those requests are marked as gray
It means that browser get response from cache (without a server requesting)
Please see
http://stackoverflow.com/questions/6797361/how-to-interpret-grey-items-in-firebug-net-panel

nil5286
Apr 11, 2012, 1:17 PM
Thanks, so the grey link indicates it has fetched from the cache. As the grey link also was showing 200OK next to it so i got worried.
The cache expires after a year?

Daniil
Apr 13, 2012, 5:27 PM
Confirmed, after a year.