This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to control Browser buttons from a Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to control Browser buttons from a Servlet" Watch "How to control Browser buttons from a Servlet" New topic
Author

How to control Browser buttons from a Servlet

Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
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..


Best regards,<br /> <br />vanchin
Dominik Ratajski
Greenhorn

Joined: Feb 09, 2004
Posts: 14
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
 
Consider Paul's rocket mass heater.
 
subject: How to control Browser buttons from a Servlet
 
Similar Threads
How to control Browser buttons from a Servlet
Programming Phone Contacts
printing from the client/browser using servlets on the server
How to stop BEEP
browser back button problem.