aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to disable IE browser 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 "How to disable IE browser BACK button." Watch "How to disable IE browser BACK button." New topic
Author

How to disable IE browser BACK button.

shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
Hello All,
Am struck up with a problem as i want to disable IE browser BACK button not the BACKSPACE.
My exact scenario is wen i log out of my application i get login page, and from my login page i need to disable IE browser BACK button.
Please help me.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
It is basically impossible to do it. There is a history.forward trick, if you search the forum, I am sure you are to find it.

Eric
Rob Hunter
Ranch Hand

Joined: Apr 09, 2002
Posts: 826
Eric,
Not sure if this is what you're referring to or not but some sites seem to the following. Page A needs to get to page B but instead of going there directly a redirection page happens in between (or multiple redirtection pages). When someone clicks back it hits the page forward again which cancels out the back. Not sure about you guys but I find it a bit annoying sometimes. Clicking the back button multiple times, very quickly, seems to get you back though.

Rob
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Rob,

You are correct, I do not believe in limiting the users. Correct usage of sessions and expiring headers should be fine. All of these JavaScript hacks are useless when JavaScript is disabled or a user actually needs to go back.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61612
    
  67

It does amaze me just how many web developers think that ticking off their users with such nonsense is a good idea.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ankit kumar
Ranch Hand

Joined: Apr 28, 2008
Posts: 108
Try this . It will work sure .
history.go(+1)


Cleared SCJP 1.5 | Cleared SCWCD 5.0
SCDJWS 6 in progress.....
shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
hi ,

where exactly should this part of code should go ?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to disable IE browser BACK button.