File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes disable back button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "disable back button" Watch "disable back button" New topic

disable back button

shivaram bupathi

Joined: Oct 12, 2006
Posts: 4
how can i disable back button of the browser from my jsp page

i tried using the following code

//Code to disable the Back Button in Internet Explorer
var URL;
var i ;
var QryStrValue;
URL=window.location.href ;
if (QryStrValue!='X')
window.location=URL + "?X";

but sometimes it is not working ,
do i need to do any settings/changes in browser?
I agree. Here's the link:
subject: disable back button
It's not a secret anymore!