-
1. Re: Logout on browser close
keithnaas Mar 4, 2008 4:13 PM (in response to nickarls)We have trapped for onBeforeUnload, but not onUnload. Should be straighforward to code up.
Are using the
remember me
functionality in the Identity object? -
2. Re: Logout on browser close
nickarls Mar 5, 2008 10:50 AM (in response to nickarls)Nope, no remembering.
Tried hooking onto onbeforeunload but the browser seems to be in a hurry to exit. It see an alert('!') I placed just before the remote call but I never get to the remote method...
Did you use any callback function or special return value that might have made your case work correctly?
Thanks in advance,
-Nik -
3. Re: Logout on browser close
keithnaas Mar 5, 2008 1:47 PM (in response to nickarls)If the function bound to onbeforeunload returns a non empty string, the browser will prompt the user if they want to leave using the non empty string in the question.
Not sure if this helps in your case though!
-
4. Re: Logout on browser close
nickarls Mar 5, 2008 10:23 PM (in response to nickarls)The strange thing is that if I call
alert('1'); // the remote call alert('2');
I see the 1, press enter and the browser closes. One would think that at least I would see the 2 (on IE7)
-
5. Re: Logout on browser close
serkan.s.eskici.online.nl Jul 8, 2010 6:04 PM (in response to nickarls)OnBeforeUnload won't do it too, because that event is also fired when you press: back, forward, reload, form submit and leave the page by clicking a link.
AFAIK there is no waterproof solution for this.
I managed to get it work in IE7, but it doesn't work well in FF.