本文介绍了关闭浏览器窗口而不是单击注销按钮时,销毁会话并注销用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在关闭浏览器窗口时注销用户,以便在数据库中设置其状态离线" . 当用户单击注销按钮时,设置状态状态离线" 非常容易. 但是,当浏览器窗口关闭或该用户的会话超时到期时,就会出现问题. 问候, Bunniy ...
Hi, I want to logout a user when browser window is closed so as to set its status "offline" in the database. It is quite easy to set the status "offline" when user clicks the logout button. But, the problem comes when the browser window is closed or the session timeout expires for that user. with regards, Bunniy...
推荐答案在这里检查: 检测通过单击[X]按钮关闭的浏览器 [ ^ ] 或 forums.asp/p/1094920/1658155.aspx [ ^ ] check here: Detect browser closing through clicks on the [X] button[^] or forums.asp/p/1094920/1658155.aspx[^]
也有看一下:如何检测浏览器关闭事件 [ ^ ]
更多推荐
关闭浏览器窗口而不是单击注销按钮时,销毁会话并注销用户
发布评论