wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes how t o disable back button after logging off 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 » Engineering » HTML, CSS and JavaScript
Bookmark "how t o disable back button after logging off" Watch "how t o disable back button after logging off" New topic
Author

how t o disable back button after logging off

Sekhar Chand
Ranch Hand

Joined: Apr 05, 2006
Posts: 73
hai guys,
In my project when a user do signout from his account, action forwards to signin page.
There how to disable the back, with out having any history.
I think more people worked on this.
So please give me relavent solutions, or tell me how you overcome this problem.
If you do so, then you are the person who helped me a lot.

Thanks in advance
nani
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

You can't really disable the browser's back button. The solution is to write your application to handle the situation.


GenRocket - Experts at Building Test Data
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

You could try to close the current window using java script. However that would prompt the user if the he/she really wants to close the browser.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Originally posted by John Meyers:
You could try to close the current window using java script. However that would prompt the user if the he/she really wants to close the browser.



NO! lol

You can expire the page with meta tags, but that only works IF you are using posts. Gets will not allow it to expire.

Eric
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
I think you must use location.href="your1stpg.php" in your2ndpg.php..


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
kranthi chamarthi
Ranch Hand

Joined: May 08, 2007
Posts: 95
Check the session in each and every jsp or servlet and if the session doesnt exist then forward it to login page.
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
Originally posted by kranthi kumar.chamarthi:
Check the session in each and every jsp or servlet and if the session doesnt exist then forward it to login page.


Pressing the browser's back doesn't make a call to the server. So I really don't think your suggestion would be of any help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how t o disable back button after logging off
 
Similar Threads
Disable the form elements in Netscape 4.36?
How to disable IE back button.
Send response to login page
How can i avoid replications?
Disable the form elements in Netscape 4.36?