wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to control Browser buttons from a Servlet
 
Similar Threads
browser back button problem.
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