Discussion Locked

Disable the Back Button

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How to disable the Back button in the Browser?

5 replies

by jay eckles

You can't. Best you can do is open a browser window that does not contain a toolbar. Even then, there are hotkeys available, like Alt+arrow. You can try writing a Javascript to catch Alt+* combinations, but I have been unsuccessful (the events fired by Alt+ combinations occur before the Javascript can trap them). Even if you were successful, what happens when a user has Javascript turned off?

The best solution is to design your pages with the back button in mind, even if you try to discourage its use.

Jay Eckles
www.jayeckles.com

by tjc

You can't, as stated by the previous poster. But what you can do is fill in the history of the browser with your web address. That way if they click the back button it will take them back to your page. For more points, I may give you the code to do this ;)

This discussion is closed to new replies.