MVC How to clear session and close the current browser tab on click of logout link?


0 votes
asked Mar 14, 2016 by Eftekhari (1,780 points)
I am trying to clear session and close browser tab on logout link click. Wont get any suggestion for thattry this jsfiddle

4 Answers

0 votes
answered Mar 22, 2016 by Seems_Y (340 points)

So if you are working on multiple tabs it will terminate session for all of them.
Also, logins are handled via cookie not session state. There is no fool proof way to determine if someone closed a browser or not.
0 votes
answered Mar 30, 2016 by santino (2,000 points)

Sign Out() when click the logout button.
commented Mar 31, 2016 by iConsidered (1,120 points)
When answering a question please:Read the question carefully
+1 vote
answered May 4, 2016 by fub5757 (220 points)

But the application in another tab can still work. So question is: how to enable the tabs with different session. Even the app has login page and user login in the web app in different tab. Net Session is having same value for differnt browsers.
0 votes
answered May 23, 2016 by Nichter (600 points) 1 flag
I realize that this is not a direct answer to your question. Try using the How to retain session after browser close? - youku.io macro to define your package loads and customizations
commented May 23, 2016 by dishman (110 points)
When the new tab loads the Charts
commented May 24, 2016 by pallafor (400 points)
AJAX :: Trying To Get A Page Working Using A Tab Container And Multiple Tabs

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...