开发者

Cross browser window close event [duplicate]

This question already has answers here: Closed 12 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜