Re: Re: preventing "back" button usage?
| From: | Erik Price | Date: | Tue, 02 Apr 2002 14:54:13 +0000 |
| Subject: | Re: Re: preventing "back" button usage? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-91144@lists.php.net to get a copy of this message | ||
On Tuesday, April 2, 2002, at 09:15 AM, Rick Emery wrote:
use cache control in your HTML to prevent BACK button usage This is easily doneI've tried this using the HTTP headers recommended on the header() man page, such as header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); These don't seem to have the effect that I'm looking for. Someone else on the list suggested storing a session variable that basically says "this page has been filled out, do not do anything if it has been resubmit" which is a good idea, but I was hoping to have the user automatically re-routed to an error page if they hit the "back" button. (The session variable idea won't work until they refresh a page or submit a form, because they will be returning to a page in their history.) Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com