Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to tell when a browser is retrieving a page from a cache?

I've thought that opening a new tab and directly browsing to the URL would make a fresh pull request from the server, but after testing (in which certain page tailorings weren't changing), it seems that this does not happen.

So is it possible to tell when a browser is pulling something from a cache versus pulling it straight from the web server?

share|improve this question
In fact, typing a URL (or using favorites) often does not ask the server if cached content is still valid. Whereas refreshing a page often makes a browser ask the server, just to be sure. – Arjan Jul 1 '13 at 19:48
up vote 5 down vote accepted

The way I usually tell is to hit CTRL+SHIFT+K, or otherwise open the web debugging console, and watch the "Net" requests as the page loads. If you pay attention to the status codes, you'll see something like

[15:15:26.059] GET [HTTP/1.1 304 Not Modified 312ms]

when the cache is used, instead of the normal

[15:15:26.059] GET [HTTP/1.1 200 OK 31ms]

And if you want to be really sure that you're not using the cache, hit CTRL+F5 when refreshing.

share|improve this answer
Or it might simply show "from cache" when clicking around rather than using a page refresh. – Arjan Jul 1 '13 at 19:46
Brilliant! Thanks. – Coldblackice Jul 1 '13 at 20:08
If you like it, you should accept ;) – kenbellows Jul 3 '13 at 15:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .