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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply 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: 56201
    
  13

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.

[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56201
    
  13

Which is why I suggested searching for the previous discussions on that issue.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Disabling the back button of web browser
 
Similar Threads
Problem in Sessions
session management for logout
Session Problem
PROBLEM IN SESSION,
How to delete the server side sessions