On browser close event

I need an event that can trigger a Microflow as soon as a user closes the browser. I was hoping to trigger an event by searching for users without active sessions in a scheduled event. This will work with the right settings in your app server (user persistent sessions). Unfortunately the session does not end when the user closes the browser. So the question: How do I trigger a Micoflow when a user closes the browser?
1 answers

In Mendix 2.5.3 you can use the Core.getActiveSessions() api to query active users, without using persistent sessions. A sessions ends within 5 minutes after closing the browser.

To listen to the browser unload event a custom widgets needs to be build. However this won't be a reliable method since the browser does not always inform the page about being closed.