...use component SESSIONCLOSER in your outmost page. This will cancel the server side session when the page disappears...
ONLY DEFINE IT ON THE OUTMOST PAGE! ;-) If an innter page is closed, this should not close the session...
On server side: Dispatcher.destroy() is called for the top-dispatcher instance (this is the one created via constructor without parameters).
Regards, Björn
PS: either by query parameter "?ccconfirmexit=true" or by using component CLIENTCONGIF-CONFIRMEXTI="true" you may tell the browser to start a popup asking the user "Do you really want to leave the page...?"