Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    i m agree with your solution, but i want to add this handling to logout automatically when user close browser before logout . in my application if user directly close browser without logout then user cant login before 20 minutes . Commented Oct 21, 2010 at 12:44
  • 1
    Keep in mind that no matter what you come up with, no matter how clever, a logout signal is NEVER assured, as I explained above. You may send a logout command using 'onunload', but you'll have to handle it properly so that you don't lot out a user that is navigating to another page of your system, plus it won't work all the time. My honest opinion is that it is not worth the effort. Just live with the lost sessions being killed by timeout. Commented Oct 21, 2010 at 15:21