Making a page non-cacheable using a meta

Testing the effect of supposedly cache-affecting metas in HTML.


The basic scenario is that something on the HTTP layer would cause caching and the author tries to undo caching on the HTML layer. In all these tests, the HTTP layer has an Expires header with the expiry set to 60 seconds from now. The text on the page is the current time.

If you navigate to a page twice (more than 1 second apart but within 60 seconds) and the page shows the same text, the page was loaded from the HTTP cache. If the text is different, the page didn't get cached. Be sure to test the baseline first. (It appears that Safari 5.0.2 on Windows 7 fails to cache the baseline!)

When renavigating to a page, you should right-click to open a new tab when following a link from this page. Do not press ctrl-L, return. That gesture does not mean plain renavigation in WebKit-based browsers.

Quirks Standards
<meta http-equiv="Expires" content="0"> Test Test
<meta http-equiv="pragma" content="no-cache"> Test Test
<meta http-equiv="cache-control" content="no-cache"> Test Test
All three Test Test


The meta prevented caching
The meta did not prevent caching
Firefox 3.6.10 Ubuntu bundle Opera 10.62 Linux 64, Windows 7 Chrome 7.0.536.2 dev Windows 7 Safari 5.0.2 Snow Leopard IE 8.0.6001.18702 (XP) IE 9 beta 1 (Windows 7)
<meta http-equiv="Expires" content="0"> N N N N Y Y
<meta http-equiv="pragma" content="no-cache"> Y Y N N Y Y
<meta http-equiv="cache-control" content="no-cache"> Y Y N N N N
All three Y Y N N Y Y