Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable browser buttons

 
Ankur Rati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we disable browser buttons like back/forward from JSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Thank goodness.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ankur,

you cant.also read this .is this make sense?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot disable browser buttons. If you could, what should stop you from disabling other things / reading private data from the browser etc etc ? Let us know the underlying reason behind this requirement. If you do not want to display cached pages, there are ways through which that can be accomplished.
 
Karan Johar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No way to disable Back button using jsp. But in javascript i think you can find from history which page user coming from.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankur Rati wrote:How can we disable browser buttons like back/forward from JSP?


This has to be a FAQ, if not, we need to start one.

This question has been coming up since applets and other programming tools started showing up in browsers in the mid-90s. It comes because the application/scriptlette/etc. gets its state all screwed up if the user uses the normal back/forward buttons on the browser. This is true. But what
@Ankur Rati asks is the wrong question.

The proper questions is: Since my code currently gets all screwed up when the user does the Browser back/forward button thing, how do I fix my code.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has to be a FAQ, if not, we need to start one.

It does have a FAQ entry: http://faq.javaranch.com/java/InterfaceDesignersRule1
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, asking how to disable the browser to fix application problems is like using Cover Girl to hide a rash.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Indeed, asking how to disable the browser to fix application problems is like using Cover Girl to hide a rash.


Sometimes is more like trying to use Cover Girl to hide a chainsaw wound.
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:Sometimes is more like trying to use Cover Girl to hide a chainsaw wound.


Hey! Don't post things like that when I have a mouthful of liquid!
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Opps, sorry.

Just that it took me a decade to learn that no matter how badly you or the PHB wants you to "fix" the applet by breaking the user's expectations, it is never a good idea.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic