Hi there,
this is code that worked for a form to form to form page (multiple form steps). I got it from the php.net site:
2003-04-24: source for this was on: http://www.php.net/manual/en/function.session-cache-limiter.php
session_cache_limiter('none');
session_start();
$expires = (function_exists('session_cache_expire') ? session_cache_expire() : 60 ) * 60;
$gm_expires = gmdate('D, d M Y H:i:s', time() + $expires);
header("Cache-control: private, max-age=$expires, pre-check=$expires");
header("Expires: $gm_expires GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
Boy I can assure you, when I put this at the head of the page, I NEVER get this message:
Warning: Page has Expired
But the problem is this:
Suppose I'm at page index.php?view=default, which lists about 25 records. I click and a "delete" icon I have to the left of that, and that goes to index.php?deleteID=22, which will delete record #22. OK, since index.php?view=default is different than ...?deleteID=22, this is a new page and you'll only see 24 records (we got rid of 22).
OK, now, if we either hit back in the browser, or click on an exact link index.php?view=default, I get 25 records. So far no problem, most people would instinctively hit Control-R (Refresh Page), and expect to see 24 records.
BUT... no go (at least in I.E. which is all I care about for this Intranet). You can hit Control-R till the cows come home, and you can't get the updated page from the database.
One of the things that's ALWAYS bothered me about PHP vs. ASP (really the only thing) is this Warningage has Expired feature.
Can anyone give me something that WORKS?
If this continues I'm going to have to snoop raw headers from ASP pages and figure this out. I can't have a functional site with these warnings, OR with this no-refresh problem.
Extremely grateful,
Sam Fullman
Compass Point Media