Forum Moderators: open

Message Too Old, No Replies

Disabling Back Button of a Browser

         

Pauly

8:29 pm on Jun 12, 2001 (gmt 0)

10+ Year Member



My problem is once I sumit an
order in an order form, I don't want the back button
to function means even if you click back any number of
times you should be in the same page. I have seen some
sites with this functionality but I don't remember.
Please help me with this. I would appreciate your
help.

Brett_Tabke

9:18 pm on Jun 12, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi Pauly, welcome to the forum.

Breaking the back button is listed somewhere as one of the top 3 sins a webmaster can do.

Some alternatives:
- use a no cache header line to thwart caching of the previous page.
- spawn a new window on the form submit. Most browsers will lose that windows "history" when a new window is spawned.
- session and url tracking. Let a script control their flow so that you know where they've been and where they should be going to.

- use a redirect on your submission page so that there is one url you can completely control. Use a no cache header on the redirect page. Then if they hit the back button, you've got a one page buffer that you can send them somewhere else from.

Follow that? Know enough to do something like that?

Even with that, there will be browsers that will be able to side step every action.