Ahh...ok i changed 'e' to 'T':
<?php
// Sun, 06 Nov 1994 08:49:37 GMT
$date = date('D, d M Y H:i:s T');
header('Pragma: no-cache');
header('Cache-Control: no-cache');
header("Expires: $date");
header("Date: $date");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>expires test</title>
</head>
<body>
This document expires: <?=$date ?><br>
<a href="page2.php">Page 2 Link</a>
</body>
</html>
which outputs this date format:
Mon, 22 Feb 2010 19:09:40 PST
The behavior is still the same -- which tends to jibe with your quote from the HTTP spec.
This approach does seem to do what i think he wants. start with page 0:
<?php
session_start();
$_SESSION['ok_to_visit'] = TRUE;
?>
<a href="page1.php">page 1</a>
click that link and go to page 1:
<?php
// expires.php
session_start(); // must start the session first!
if (!isset($_SESSION['ok_to_visit']) || ($_SESSION['ok_to_visit'] !== TRUE)) {
die('this page has expired');
} else {
unset($_SESSION['ok_to_visit'] );
}
?>
HERE IS THE PAGE CONTENT<br>
<a href="page2.php">page 2</a>
click that link and go to page 2, whose content is irrelevant, then click the back button. i get:
this page has expired
Which, given the results of this discussion so far, is kind of a mystery to me.