File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how t o disable back button after logging off

 
Sekhar Chand
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't really disable the browser's back button. The solution is to write your application to handle the situation.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you must use location.href="your1stpg.php" in your2ndpg.php..
 
kranthi chamarthi
Ranch Hand
Posts: 95
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 261
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic