Good day,

This can be accomplished in a few ways.  The easiest way is to tell the
client not to cache the page.  And yep, you do this via headers.

In PHP (attempting to hit as many types of browsers as possible):

header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");

You can also do some fancy redirection with Location headers.

As a failsafe, you should have the processing page make sure that the user
isn't submitting the same thing more than once.

============================
Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-----Original Message-----
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] preventing "back" button usage?


Sorry to plague this list with questions today, but I was hoping someone 
could help me understand a fundamental thing about how browsers work -- 
how can I achieve the effect that many ecommerce sites (such as Amazon) 
use to prevent the user from going "back" in their history?  For obvious 
reasons, I would like to avoid JavaScript to achieve this feat.  I have 
some multi-part forms that I do not wish users to be able to repeat 
accidentally.

I believe it has something to do with a header and the browser's cache, 
but I really don't know anything about it.


TIA,

Erik





----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to