No caching

From JumbaWiki

Jump to: navigation, search

You can place these codes in your HTML code to force your page to reload from the server everytime and not cache pages.

HTML

<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Expires" content="Mon, 26 Jul 1997 05:00:00 GMT" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="Cache-Control" content="post-check=0, pre-check=0" />

Different browsers recognise different tags; those shown should cover all browsers.

PHP

<?php
Header("Pragma: no-cache");
Header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
Header("Cache-Control: no-store, no-cache, must-revalidate");
Header("Cache-Control: post-check=0, pre-check=0");
?>

See also

Personal tools
Australian Photography | Unique Views of Reality | Daedalus