End session when user closes the tab or browser without logging out

Hi,

How to end the session if user closes the tab or browser without logging out. If the user opens the page on history in chrome, it should direct to login screen but in my case its going to screen where user have been before.

Regards,

Wasim khan S


Hi,

we can find the tab/browser close event in javascript using "window.onbeforeunload" & "window.onunload" events. you just need to call the logout action from javascript by clicking on logout icon.

you can refer below link for more detials.

https://stackoverflow.com/questions/3888902/detect-browser-or-tab-closing

Thanks,

Siva


Hi Wasim,

Go throught this link- 

https://www.outsystems.com/forums/discussion/29807/clear-session-variable-when-the-application-is-closed/

here is oml attached you can use inside your application.


Hope this will help you.

Thanks 

Rahul Shau

Rahul Sahu wrote:

Hi Wasim,

Go throught this link- 

https://www.outsystems.com/forums/discussion/29807/clear-session-variable-when-the-application-is-closed/

here is oml attached you can use inside your application.


Hope this will help you.

Thanks 

Rahul Shau

Hi,

I can't find solution on it. 

Regards, 

Wasim khan S