Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

browswer's back button

 
manasa teja
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to disable browser's back button.. could u please explain it..
 
Peter Storch
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, there is no real way with HTML / JavaScript. You also have to consider Bookmarks or that the user types in anything as URL. There is also the issue of caching which can be controlled only to some extend.
Your web application has to be build with this drawback of HTML/HTTP in mind.
Consider using e.g. Struts Token mechanism to detect multiple requests, or some kind of State Machine or Workflow controller on the server side to handle pageflow.
Don't rely on the browser, build a foolproof webapp.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
 
Timothy Toe
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree 101% with Peter Storch. Peter has given some real solid advise. "Don't rely on the browser, build a foolproof webapp."
The link given by Eric Pascarello depends on JavaScript which does not work on some browsers. So becareful. You can use it only if your webapp is not mission critical... no real transactions.
 
Timothy Toe
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The back button problem that we face brings us back to some history. HTML/HTTP originally was only to handle web pages and nothing else. By webpages I mean simple read only dead webpages... that you read like a book.
This is why we have buttons like back, forward, bookmark etc etc.
Few did think that HTML/HTTP would evolve to handle web app like what we have now. By web app I mean real application that allows you to perform transactions, even monetary transactions (with Credit Cards etc).
With this, these convenience buttons became troublesome buttons..
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you really need would be a sever side expire on the page if you are doing importnat trans.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic