4

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:

  1. Start Firefox, goto my page
  2. All requests show 200 OK
  3. If I press F5, I see all the requests as 304 Not Modified
  4. 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:
    enter image description here

  2. When I press F5 this is what I see:

    enter image description here

    This is what an individual request looks like:

    enter image description here

    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?

j0k
  • 21,914
  • 28
  • 75
  • 84
nilesh
  • 315
  • 2
  • 10
  • 24
  • 1
    +1 for providing excellent debugging information. – usr Apr 11 '12 at 11:19
  • 2
    Just wanted to make sure the answer to this doesn't get lost below, but this is the correct cacheing functionality. After first request, the requests are made directly to cache and each line-item is greyed out. More discussion is available at http://forums.ext.net/showthread.php?18340-Browser-does-not-cache-resources-after-restart – geoffrey.mcgill Apr 12 '12 at 04:41
  • 1
    @geoffrey.mcgill If you post your comment as an answer, I will accept it. – nilesh Apr 12 '12 at 06:19

2 Answers2

2

The line items on initial request are 'black' and fetched from original source. The items are then added to browser cache.

On subsequent requests, the items are pulled directly from cache, and coloured 'gray'. I guess this is just a 'feature' of Firebug.

More information is available at the following locations:

http://forums.ext.net/showthread.php?18340-Browser-does-not-cache-resources-after-restart

How to interpret grey items in Firebug Net panel?

Hope this helps

Community
  • 1
  • 1
geoffrey.mcgill
  • 2,355
  • 1
  • 13
  • 21
  • It's been a while, but probably worth noting that the 304 not modified response (with no body) comes from the server in response to the "If-Modified-Since" header, reassuring the browser that the cached version is still valid and can be used. So those entities were cached but verified. – Szocske Jan 14 '13 at 15:11
0

Usually caching is controlled by web server. What's your web server and what's the configuration for the directory where your app is?

sha
  • 17,524
  • 5
  • 59
  • 96
  • I got the answer the resource file in the ext.net is coming from the cache as the grey get part indicates, for every request on restarting the browser. http://stackoverflow.com/questions/6797361/how-to-interpret-grey-items-in-firebug-net-panel – nilesh Apr 11 '12 at 13:38