Cross browser window close event [duplicate]
Possible Duplicate:
Close /Kills the seesion when close the browser or tab
Is there a solution for cross browser event. I 开发者_Python百科need to check if user closes their window and to throw an ajax request to my database to sign them out.
I've looked everyone but most cases its not working in all browsers. Anyone have a solution? Or Alternative on how to do this perhaps a conditional statement depending on the browser?
Thanks!
I don't think such a thing exists. You can try an onunload, but that also fires when you refresh the page. This question has been the bane of many that want to do what you're asking for.
精彩评论