wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes how to diable browser back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to diable browser back button" Watch "how to diable browser back button" New topic
Author

how to diable browser back button

Shivanath Yerra
Greenhorn

Joined: Jul 16, 2001
Posts: 8
how to disable the browser back button?
Jeff Sunder
Ranch Hand

Joined: Jun 26, 2001
Posts: 47
I have done a lot of research on this and the basic answer is that you cannot. There are many tricks that you can try, but none of them actually disable the back button.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4340
    
    2

Jeff is correct however one of the tricks he mentions is this:
The location object's replace() method overwrites the current history entry with the specified URL. It removes the current history entry before the next URL is loaded. Removing the item from the history list also prevents users from seeing the page again by clicking on the Back button later.
This technique is very useful for online games and multi-page forms, where you want prevent the user from returning to the previous page. Furthermore, the location.replace() method is supported by all browsers except Navigator 2.0x. The following example shows how to use this method in a link:

<A HREF="javascript:location.replace('nextpage.html')">Advance</A>

SCJP
Visit my download page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to diable browser back button
 
Similar Threads
Browser Back button
Disable Back button
selenium rc - go forward
Disabling the Back button of the browser
Browser Disable