DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JSP (http://www.daniweb.com/forums/forum24.html)
-   -   Window close event in safari (http://www.daniweb.com/forums/thread118028.html)

Nithu25 Apr 8th, 2008 4:50 am
Window close event in safari
 
Hi,

I have a problem in catching window close event in safar. If the user close the browser window without logging out, i have to invalidate the session. The problem is that , how to catch the window close event in safari? Unload cannot be used, since unload will be fired evenif the user clicks on someother links or refreshes the page. Kindly provide me a solution.

Thanks in advance.

jwenting Apr 8th, 2008 1:10 pm
Re: Window close event in safari
 
you can't catch it, at least not reliably.
There are many ways to close a window, some can be caught, some can not.
I actually did extensive research into that several years ago, and that was the conclusion.

Instead you should learn how to monitor session timeouts and act on them.

Nithu25 Apr 9th, 2008 1:26 am
Re: Window close event in safari
 
Thank U Jwenting for your reply.


All times are GMT -4. The time now is 4:08 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC