Open as3445 opened 5 years ago
Django has built-in support for this.
That will not work if I just close my tab without closing the window.
I have been looking up how I might do this, and actually there's no easy way to differentiate navigation to a new page vs closing the tab. 🤔 So .onbeforeunload()
is actually not viable
One of the requirements for a project that I am working on is that the session would expire on tab close. I can imagine other may want a similar feature. I propose that this app implement an endpoint that the client can call
.onbeforeunload()
and the server will invalidate the session.