prevent refresh

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Think Pink
Forum Contributor
Posts: 106
Joined: Mon Aug 02, 2004 3:29 pm

prevent refresh

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

AFAIK, don't use post.. that's the only 100% sure way to not have this problem.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post 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).
Post Reply