Reputation: 1
Our Web application has multiple pages and doesn't have any logout functionality.We have tried onunload method but it's not working in Chrome browser. We tried onbeforeunload method, but it's getting called for page redirection as well. Is there a way to end the session when the user closes the tab for multi-page web applications?
Upvotes: 0
Views: 103
Reputation: 2603
For particular tab it is not possible, but if entire browser is closed then session can be destroyed.
For browser close you can put below code into your web.config :
<system.web>
<sessionState mode="InProc"></sessionState>
</system.web>
You can try out ways given in this link: Close/kill the session when the browser or tab is closed
Upvotes: 0