A1ien51's disable the Back Button http://www10.brinkster.com/A1ien51/S...BackButton.htm
What is going to happen, is when the page loads, it will send the surfer to the last page in their history.
Now if a person tries to go back to it, then it will send them directly back to the page they pushed the back button on!
Add this code to the header of your page:
JPS: Thus need to put the code on the page you don't want the user to be able to go back to.
And here is my version of it:
// Disable browser's Back button on another pg being able to go back to this pg.
Personally I can't understand why you would want to do something like that in the first place.
Well I've used it for a confirmation page where a user just registered something and I don't want the user to just use the browser's back button to go back and change the last page (or pages before that) and in effect submit another registration...
Yup, depending on how the form can be submitted there are various ways to prevent the multiple submitting.... disabling the back button IMO is a cop out for doing the job properly... not trying to be rude or anything...
If the user types and hits the url on the browser the registration form will be submitted again. You can use session variable to prevent the user from double submit of the form.
Yes, session variables can and are being checked everytime a page is opened to make sure someone can't get in (again) if you don't want him too.
But the browser's back button is sort of a "loophole" to still allow the user back to a page you don't want him on anymore. For example even after a session times out a user can still hit the browser's back button and get onto a session variable protected page.
The code above keeps this from happening and works very well for this admittedly limited use purpose.
In other words I don't use this code very often but there are some times when it does come in handy.