You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Søren Blidorf <so...@nolas.dk> on 2007/07/20 19:54:51 UTC
"sessionDestroyed" don't respond to the user closing the browser window
Hi.
I am trying to get the number of sessions that is active.
I have made a SessionListener and every thing works as I intended except
that the sessionDestroyed dont respond to the user closing the browser
window.
I there a way to destroy/invalidate a session when the browser is closed
without using javascript:onunload
Soren, DK
Re: "sessionDestroyed" don't respond to the user closing the browser
window
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Søren,
Søren Blidorf wrote:
> I am trying to get the number of sessions that is active.
>
> I have made a SessionListener and every thing works as I intended except
> that the “sessionDestroyed” don’t respond to the user closing the browser
> window.
That's because closing the browse window does not terminate the session
on the server side.
> I there a way to destroy/invalidate a session when the browser is closed
> without using javascript:onunload
No. And even if you use an 'onunload' method in your page's body, you
still won't get what you want: the unload event will fire when the page
changes, not just when the window is closed.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGoRIM9CaO5/Lv0PARArwzAJwOfJN6GMFZcNA7XNf9t4Sqr0viTwCeJLwF
PpO8j1pOu5EdhwakTlRzz4Y=
=J/gt
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org