Reputation: 8166
I've heard it suggested by several different sources that browsers sometimes ignore caching headers and instead use stale content. However, I've never actually observed this.
Is it true that browsers sometimes ignore valid caching headers? Has it ever been true?
Can you give me any example situations where a browser would ignore a Cache-control: no-cache
header or something similar and instead give the user stale results?
Upvotes: 1
Views: 873
Reputation: 26549
One of the main problems you may face is not the browser, but the proxy that the browser is using.
"must-revalidate: Some proxies can be configured to ignore the Expires and maxage.
This keyword forces them to always act like the resource was expired.
proxy-revalidate: Same as must-revalidate, but only for proxies.
s-maxage: Same as maxage, but only for proxies."
Source: http://www.tommylacroix.com/2008/07/17/http-caching-basics/
Additionally, it can happen that a browser serves stale content due to the cache control specifying that content should not be re-validated until X amount of time has passed.
Upvotes: 1