简体   繁体   English

浏览器/标签页上的结束会话关闭

[英]End Session on browser/tab close

I have browsed through out the internet. 我已经浏览了互联网。 I can't find a proper solution for this. 我找不到合适的解决方案。 Is there a proper way to kill/end session when browser or tab is closed without logging off? 当关闭浏览器或选项卡而不注销时,是否有一种适当的方法来终止/终止会话?

I have tried all the codes in javascript that I found on internet. 我已经尝试了在互联网上找到的javascript中的所有代码。 None of them work. 他们都不工作。

All my users use IE only. 我所有的用户仅使用IE。 So the code can work for that alone. 因此,代码可以单独使用。 Any tech is fine with me ie, javascript, jquery, ajax. 任何技术都适合我,例如javascript,jquery,ajax。 Is there any solution for this? 有什么解决办法吗? I know HTTP is stateless, browser event is client side and all that. 我知道HTTP是无状态的,浏览器事件是客户端等。 But someone should have a working code for this. 但是有人应该为此有一个有效的代码。 Please help. 请帮忙。

There is no working code for this. 没有适用的代码。 The only 100% working way, especially in case of IE – using keep-alive requests and clear session by timeout on user inactivity. 唯一100%的工作方式,尤其是在IE的情况下-使用保持活动请求并按用户不活动超时超时清除会话。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM