在浏览器或选项卡关闭时终止会话
问题描述:
how can I kill the session when the user closes the browser?because my server Going to slow down.any one can help me??
答
Http是无状态的,因此您无法确定地捕获该事件。您可以实现heartbeet - 但在您的情况下,它可能会使服务器速度更慢和/或您需要将会话超时设置为更低的值。但是你受到应用程序使用模型的限制。
最好做一些性能检查和调整。您的应用程序可能需要一些整容。它真的是ASP经典吗?
Http is stateless so you can not catch that event with certainty. You either implement heartbeet - but in your situation it might slow down server even more and/or you will need to set the session timeout to a lower value. But you are constrained by the application usage model.
Better do some performance checkup and tuning. Your application might need some face-lifting. Is it really ASP classic?