note 94543 added to function.session-cache-limiter
| From: | jawa dot coder at gmail dot com | Date: | Wed, 11 Nov 2009 11:08:04 +0000 |
| Subject: | note 94543 added to function.session-cache-limiter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162745@lists.php.net to get a copy of this message | ||
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:
<?
// 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.
----
Server IP: 192.41.40.227
Probable Submitter: 82.201.134.3
----
Manual Page -- http://www.php.net/manual/en/function.session-cache-limiter.php
Edit -- https://master.php.net/note/edit/94543
Del: integrated -- https://master.php.net/note/delete/94543/integrated
Del: useless -- https://master.php.net/note/delete/94543/useless
Del: bad code -- https://master.php.net/note/delete/94543/bad+code
Del: spam -- https://master.php.net/note/delete/94543/spam
Del: non-english -- https://master.php.net/note/delete/94543/non-english
Del: in docs -- https://master.php.net/note/delete/94543/in+docs
Del: other reasons-- https://master.php.net/note/delete/94543
Reject -- https://master.php.net/note/reject/94543
Search -- https://master.php.net/manage/user-notes.php