Wanted: surefire way to invalidate session when browser is closed
843840Feb 14 2002 — edited Mar 13 2008Goal: to invalidate a session if the user closes the browser.
What I already know:
1) I know how to invalidate a session.
2) I know how to cause a session to timeout after a certain time interval has passed.
3) I know that the on onbeforeunload event fires if a browser closes, or if the user hits the back button, or any number of other things. This won't work, it's too general. I need an event specific to browser close.
Please don't tell me what I already know. However, if there is no way to detect browser (and browser only) close, but you have some other surefire approach for invalidating a session when the browser is closed, points will be awarded for that.