This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to control Browser buttons from a Servlet

 
Vanchi Nathan
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Is there a way for a servlet to disable the back button of the browser to control navigation.
Please advice... thanks in advance..
 
Dominik Ratajski
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no.
strictly speaking a servlet cannot disable browser buttons.
you'd have to do something through javascript using the history:
if (currentpage is in history) {
window.history.forward(1);
}
in general, you cannot control a users browser - ie font preferences, disabling buttons etc.
the other way would be to use a session based pages which expires so that if they go back they would get page cannot be found etc.
DSR
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic