Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If i go to example.com [placeholder for different website] it creates the numerous cache entries in the browser for different items on the page and two entries for example.com. One of which expires in 1.5hrs and the other has 'No expiration time.'

What I am wondering is: when does the browser display the cached page and when does it get the newest version from the server (when re-visiting the site)?

What do the two different expiration times for the top level domain mean?

A web page I went to was temporarily redirecting to a different page. After it was back up, I was still getting redirected to the temp page even though the correct page was up. Would this have eventually resolved itself based on expiration times or does the cache need to be cleared?

share|improve this question

1 Answer 1

example.com has a host-header Cache-Control:no-cache on each respone header, so it doesn't cache unless you set your browser to do so...

When does the browser display the cached page and when does it get the newest version from the server (when re-visiting the site)?

This depends from site to site; some tell the cache to remain a copy for a certain time and you'll have to wait till it runs out, other sites will have some way to determine if the cache is still valid and will only retrieve the file if it isn't. This is done by first doing a HEAD request (getting the header) and then requesting the actual file with GET if the cache is invalid.

share|improve this answer
    
I am neither lying nor mistaken. example.com was simply meant as a placeholder. –  user142485 Sep 14 '12 at 15:31
    
So in my example where [somewebsite].com has two entries, both 1.5hr and 'no' expiration times, when would that expire and why are there two entries? –  user142485 Sep 14 '12 at 15:41
    
As I said, they either run out when time expires (after 1.5hr or never) or when the cache gets invalidated (due to a changing ETag, or people that add ?r4nD0mG4rBl3203704123 to their URL); supposing you wouldn't clean the cache yourself or set a different cache setting in your browser... –  Tom Wijsman Sep 14 '12 at 15:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.