Note Submitter: neil at 11 out of 10
----
Response to hervard at gmail dot com (18-Apr-2006 06:53)
The code you gave for preventing the message appearing with the back button did not work for IE7, but changing the line:
$offset = 60 * 60 * 24 * -1;
to
$offset = 60 * 60 * 24 * 1;
makes it work OK, with my set up there's no issues with serving cached versions of the page.
<?php
// Original code found at http://www.mnot.net/cache_docs/
// thanks to hervard at gmail dot com for this solution to browser back button problems
header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 1;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
header($ExpStr);
?>
I've tested this in a standalone version of IE6
Also tested in IE7, Firefox 1.5, Opera 7.54
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.