| 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
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
|
You can't really disable the browser's back button. The solution is to write your application to handle the situation.
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6603
|
|
|
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 - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15362
|
|
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: 82
|
|
|
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.
|
 |
 |
|
|
subject: how t o disable back button after logging off
|
|
|