File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disable IE browser BACK button.

 
shabarish vai
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 832
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does amaze me just how many web developers think that ticking off their users with such nonsense is a good idea.
 
ankit kumar
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this . It will work sure .
history.go(+1)
 
shabarish vai
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ,

where exactly should this part of code should go ?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic