File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Disabling the back button of web browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Disabling the back button of web browser" Watch "Disabling the back button of web browser" New topic
Author

Disabling the back button of web browser

mahesh prabhas
Greenhorn

Joined: May 16, 2009
Posts: 2
Hello ranchers,
I have a problem in servlets , hope some one could help me out

Whenever i signout from the homepage of my web application i could get into it again when the back button of the web broser is clicked so i have programmatically tried to check whether my session is killed by putting another link on the application which redirects to login page once the user signs out.Please help me out.How do I ensure that even the user clicks the back button of web browser he doesnt enter the session but is sent to the login page.
Thanks,
MAHESHNAG.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

You can't. And you shouldn't even if you could.

Search through this and the HTML forum for many previous discussions on how to fix your application, not attempt to hobble the user's browser.

Please read this for more information.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Matt Thomassan
Ranch Hand

Joined: Dec 23, 2008
Posts: 44
Hi Bear,

I think the question posted by Mahesh is:
how can the web developers ensure that if the user clicks the back button of the web browser (after he has signed out), he does not go to the session page. Instead he should be redirected to the home page.

The question is not how to disable the back button of the users browser which obviously will freak out the user.

Thank you

Best Regards
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Which is why I suggested searching for the previous discussions on that issue.
 
jQuery in Action, 2nd edition
 
subject: Disabling the back button of web browser
 
Similar Threads
PROBLEM IN SESSION,
session management for logout
Session Problem
How to delete the server side sessions
Problem in Sessions