Pergunta

Is there any setting in Open SSO which can destroy the user session when the user closes the browser window. I know by plain JavaScript we can add the window.onbeforeunload but that is no guarantee.

Foi útil?

Solução

No. There's literally no guaranteed way to find out whether the user closed the browser window - unless you establish a poll and listen to a heartbeat emitting from client side JS (an ajax call to your server) periodically.

Upon sever not getting the heartbeat for some time, you can conclude that the browser window was closed/crashed.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top