views:

164

answers:

1

Possible Duplicate:
Close /Kills the seesion when close the browser or tab

Is there a solution for cross browser event. I 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!

A: 

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.

edl