关闭浏览器窗口而不是单击注销按钮时,销毁会话并注销用户

编程入门 行业动态 更新时间:2024-10-08 06:24:42
本文介绍了关闭浏览器窗口而不是单击注销按钮时,销毁会话并注销用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在关闭浏览器窗口时注销用户,以便在数据库中设置其状态离线" . 当用户单击注销按钮时,设置状态状态离线" 非常容易. 但是,当浏览器窗口关闭或该用户的会话超时到期时,就会出现问题. 问候, 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[^]

也有看一下:如何检测浏览器关闭事件 [ ^ ]

更多推荐

关闭浏览器窗口而不是单击注销按钮时,销毁会话并注销用户

本文发布于:2023-11-03 04:59:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554300.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单击   关闭浏览器   而不是   按钮   窗口

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!