Page 1 of 1

prevent refresh

Posted: Thu Aug 26, 2004 9:47 am
by Think Pink
how can I prevent a page from beeing refreshed?
what about prevent from pushing the back- forward button? I mean if someone presses the refresh button to appear the messageyou saw on manny pages.,
Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.

Posted: Thu Aug 26, 2004 9:55 am
by feyd
AFAIK, don't use post.. that's the only 100% sure way to not have this problem.

Posted: Mon Aug 30, 2004 3:38 am
by CoderGoblin
feyd wrote:AFAIK, don't use post.. that's the only 100% sure way to not have this problem.
I agree ... although one technique I use (not 100% safe) is after a POST has been processed I send a header('Location: xyz.php') request to point to a 'processed' document. This overwrites the browser history. I use this only on successful completion (database updated, no validation errors etc).