HACKER Q&A
📣 behnamoh

Why do websites have “sign out” button when I can just close the tab?


Esp. if the browser is set to delete cookies and adblocker(s) are running, why would a user actually want to click "sign out"?


  👤 MrCharismatist Accepted Answer ✓
Because the session with the website still exists, your browser still has cookies saying it's valid. If you reopen the closed tab the session is likely still there.

Logging out of a site specifically invalidates the session.


👤 cratermoon
At a previous employer, many of our larger customers had users (a single individual) with multiple logins, for reasons both good and bad. So some people would log out of one user, then log in again with a different user.

Other than that, the only other time "sign out" even came up was when we moved to SSO and went round and round about if and how to implement single logout[1] and what could be expected.

1 https://www.identityserver.com/articles/the-challenge-of-bui...


👤 gdilla
Some people like to terminate their session (closing the tab doesn't always do that)

Some people are using a shared computer and do not want to be remained logged in to whatever app they're using (think using your banking app at the library)

If you can login, you should be able to logout.


👤 PaulHoule
Usually your id is stored in a cookie that survives past closing the tab.

You could build an app that keeps your id in Javascript variables but people usually expect to be able to use a web site with multiple browser windows simultaneously.


👤 gostsamo
You might forget about the website, but the website might not forget about you.

Or said otherwise, if you close the tab and someone opens the website on the same browser later, they will be signed in your profile.