This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Disable Back button on Internet Explorer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Disable Back button on Internet Explorer" Watch "Disable Back button on Internet Explorer" New topic
Author

Disable Back button on Internet Explorer

Ramesh Kumar Swarnkar
Ranch Hand

Joined: Sep 15, 2003
Posts: 84
Hi Friends,
I need to disable the back button of 'Internet Explorer'.
My application has multiple screens designed in JSP.When a user goes to next page/screen by clicking some link or by posting some data, he/she would not be able to use the back button to come to previous screen.

Is there any approach in JavaScript which I can use here in my application to disable the back button ?

Please suggest some solution to achieve this.


Regards,
Ramesh
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you set the right header when you are using post, the user should get the expired page.

Other than that, I would design my backend to handle the back button.

You can look at at history.forward() hack that is posted around the net, but that really is not disabling the back button.

Eric
Ramesh Kumar Swarnkar
Ranch Hand

Joined: Sep 15, 2003
Posts: 84
If you set the right header when you are using post, the user should get the expired page.

Other than that, I would design my backend to handle the back button.


Eric, thanks for response.
can you please elaborate the above quote with some code segment!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable Back button on Internet Explorer
 
Similar Threads
Disabling 'Back' button of the browser
Browser back button
how to clear internet explorer history of client machine
disable back button
How to disable Back button on Internet Explorer Toolbar