ConfirmMessage event

I want to save automatically data when a user leaves my web app.
By taking the Session.ConfirmMessage at least I can give out a warning to the user to save data before leaving the web app.
Is there a possibility to catch the event, when the ConfirmMessage is displayed in order to save the data automatically? I’m looking for an event that fires when the user is closing the browser or leaving the web app equal to the ConfirmMessage.

Thanx for any hints
Regards Mike

No, there’s no way to know when the user is leaving your page. This is an HTTP restriction, not a WE restriction. During the alpha period, this was attempted using synchronous JavaScript, but it caused way more harm than good.

Session.ConfirmMessage works because the message is stored on the client before the shutdown happens so it can be displayed morally during the page’s final event loop.

Thanks Thom for your information, now I see clearly. I wish you Merry X-Mas!