note 73998 added to function.header

From: Date: Tue, 20 Mar 2007 12:52:38 +0000
Subject: note 73998 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-124622@lists.php.net to get a copy of this message
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 ---- Server IP: 87.124.64.96 Probable Submitter: 81.179.39.220 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/73998 Del: integrated -- https://master.php.net/note/delete/73998/integrated Del: useless -- https://master.php.net/note/delete/73998/useless Del: bad code -- https://master.php.net/note/delete/73998/bad+code Del: spam -- https://master.php.net/note/delete/73998/spam Del: non-english -- https://master.php.net/note/delete/73998/non-english Del: in docs -- https://master.php.net/note/delete/73998/in+docs Del: other reasons-- https://master.php.net/note/delete/73998 Reject -- https://master.php.net/note/reject/73998 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124622) next »