note 94543 deleted from function.session-cache-limiter by danbrown
| From: | danbrown@php.net | Date: | Wed, 11 Nov 2009 15:48:54 +0000 |
| Subject: | note 94543 deleted from function.session-cache-limiter by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162761@lists.php.net to get a copy of this message | ||
Note Submitter: jawa dot coder at gmail dot com
----
I think the problem that IE when sence that page epired it will ignor any headers or directions.
using "nocache" directive is correct and shall do the work but the problem is in the
"Expires: Thu, 19 Nov 1981 08:52:00 GMT" header, so i've made same headers but
changed the Expires to future so, IE will pass and check other headers and follow next header
directives.
sample code:
<?php
// Start session normally
session_start();
// Overwrite session headers with these headers
header("Expires: " . date("D, d M Y H:i:s T", time() + (15*60)), true);
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0",
true);
header("Pragma: no-cache", true);
?>
Now when IE goes back will find the page is still not expired, then will go to next header and act
as expected
I hope that PHP might add "no-cache-expires" to provide suggested headers in future
releases.
Hop this help people looking for solution with complete success.