note 69723 added to function.header
| From: | planetwebhostdotcom at osu1 dot php dot net | Date: | Sun, 17 Sep 2006 23:57:24 +0000 |
| Subject: | note 69723 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117275@lists.php.net to get a copy of this message | ||
This seems to work well for me to prevent double posting on my web application that comes from the
refresh and back buttons.
if ( $_POST ){
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');
}
----
Server IP: 64.71.164.2
Probable Submitter: 70.173.237.254
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/69723
Del: integrated -- https://master.php.net/note/delete/69723/integrated
Del: useless -- https://master.php.net/note/delete/69723/useless
Del: bad code -- https://master.php.net/note/delete/69723/bad+code
Del: spam -- https://master.php.net/note/delete/69723/spam
Del: non-english -- https://master.php.net/note/delete/69723/non-english
Del: in docs -- https://master.php.net/note/delete/69723/in+docs
Del: other reasons-- https://master.php.net/note/delete/69723
Reject -- https://master.php.net/note/reject/69723
Search -- https://master.php.net/manage/user-notes.php