Close tab = end user session (logout)?


I've been serachning though documentation and forum, but I cannot find an answer. Is it possible to automatically logout user after closing LAST tab of the webpage created by Outsystems? Eg. user has 3 pages opened. User is closing first and second of those - and page keeps the user logged in; but after closing the last one the user is logged out, the user session is edning. Is such thing even possible?

Hi John,

Afaik that's not easily possible. When you close a tab, the browser doesn't send anything to the server, so the server never knows you closed the tab, unless you use JavaScript to catch it, but I don't know whether this works in practice, and whether you can do enough to signal the server. Also, this will not help you detect when the last tab is closed.

tl;dr It's not (practically) possible (probably).