- Response comes from cache
- HTTP code 304 (regardless, if response comes from cache, or server)
- Something else
EDIT: Changed title and screen to clarify what I mean with "gray lines".
EDIT: Changed title and screen to clarify what I mean with "gray lines".
I have been experimenting with this all day as I had issues with browser cache in my Web application.
From what I saw the HTTP status code is always displayed in gray when it is 304
. However, IE is kinda stupid because this can mean 2 distinct things that are not easily distinguishable in the developer tools:
304 Not Modified
responseIn the second case, you can't trust what is displayed in the detailed view as the request and response headers+contents are then made up of data stored in the cache, not from an actual request. Specifically, if there is an Expires
header in the "Response headers" tab, it is actually calculated from the cached data (could be calculated from a Cache-Control: max-age=xx
header for example, and the Cache-Control
header will not appear in the list)
I think you can distinguish the 2 cases: it seems that when the "Taken" time is "<1ms" it is very likely the cache was used. If it's anything else it's likely that an actual request was made.
The above part is wrong, ignore it.
Other browsers like Firefox and Chrome do it properly in their developer tools: requests handled using only the browser cache are annotated "From cache".
I hope this could help you as I have lost several hours trying to figure out what IE was doing. This information is only deducted from my observations using IE 9 with default settings, a local JBoss webserver, and the phenomenon was seen with any HTTP request for static files: JS, CSS... Images don't seem to appear in the developer tools again when they have been loaded once (session cache ?)
For general information about browser caching I recommend this read: http://www.f5.com/pdf/white-papers/browser-behavior-wp.pdf
Edit: I found another topic discussing this here. It confirms what I have noticed by myself.
This does not really indicate an error, but rather indicates that the resource for the requested URL has not changed since last accessed or cached. The 304
status code should only be returned if allowed by the client (e.g. your Web browser). The client specifies this in the HTTP data stream sent to the Web server e.g. via If_Modified_Since
headers in the request.
Systems that cache or index Web resources (such as search engines) often use the 304
response to determine if the information they previously gathered for a particular URL is now out-of-date.