This is fine if you want to provide a popup window to the user. This still isn't an authoritative way of determining if the user has "logged out".
Your app should never depend on the client's PC having electricity. > -----Original Message----- > From: Simone - Dev [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 20, 2004 6:48 AM > To: 'Struts Users Mailing List'; [EMAIL PROTECTED] > Subject: R: Detecting browser close > > > What I'm proposing to you it's a solution that works only on > JS enabled browsers, but since this is almost the 99,99% of > the browser on the market shouldn't be a problem :-) > > On the onClose event of the window object (javascript object) > opens a new window of 10px that is displayed off the screen > (8000px left): this windows will contain a page that close > all session specific resources as soon as the user exit, > without having to wait the session timeout to expire > > I used it many times, also to provide a "u forgot to save > what you did, are you sure you want to exit the page?" alert > (but this need a onBeforeClose event that is available only on IE). > > Simone > > ------------------------- > Simone Chiaretta > www.piyosailing.com/S > Any sufficiently advanced technology is indistinguishable > from magic "Life is short, play hard" > > > > -----Messaggio originale----- > > Da: ksitron [mailto:[EMAIL PROTECTED] > > Inviato: sabato 19 giugno 2004 23.32 > > A: Struts Users Mailing List > > Oggetto: Detecting browser close > > > > > > > > Is there a way to detect when the user closes the browser. > What I want > > to do is do clean-up and destroy the session. > > > > > > Thanks in advance. > > > > -- > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]