Is there any technology to kill a user's login session if the user closes the browser?

This should work if multiple windows are open.

My application is in J2EE.

I already tried some javascript, for example, on window.unloadn, but this kind of solution is not durable.

+3
source share
2 answers

If you mean server-side, the best way is to run a beat. If none of the windows of this web application is open, nothing sends a heartbeat, and after a while the server finds out that the application is disconnected.

, 100%, (kill/crash/reboot), - cookie,

+5

HTTP , , , .

window.onunload , .

, , , ( ) . ( ) - asp.net - 20 . , .

+4

Source: https://habr.com/ru/post/1744619/


All Articles