John Bachir
John Bachir

Reputation: 22721

How do browsers behave if a document is delivered with no Expires or Cache-Control headers?

If a document is delivered with no Expires or Cache-Control headers, how long will browsers cache the document?

Upvotes: 1

Views: 148

Answers (1)

staticsan
staticsan

Reputation: 30555

In the absence of server-generated information, the browser will rely entirely on its own settings. These will be a combination of the "standard" lifetime of a page that the browser has been told, and space pressure on its cache.

Different browsers have different defaults for assigning a page lifetime. They also have different algorithms for deciding a page has expired. For instance, quite some years ago, Opera had a reputation for being a more aggressive cacher of pages than IE. This may have come out of their development environments as Opera's development team was very aware of download limits, whilst IE's was probably not. Enthusiasts may recall Opera's behaviour as being "I don't think this page has expired, I won't re-fetch it" whilst IE and Mozilla were more like "I don't know if this page has expired, I'll re-fetch it just in case".

Upvotes: 3

Related Questions