B4J Question [ABMaterial] Detect whether the browser or tab in the browser is closed or not

Anser

Well-Known Member
Licensed User
Longtime User
Hi,

Closing the browser and Logoff

Is there any way in ABM that whenever the user closes the browser OR tab (chrome or any browser) without using the logoff, it should be considered as logoff. Next time when the user open the app in the same browser, the app should consider the user as not authorized

I thought of using the Sub WebSocket_Disconnected() to update a session variable to mark , but then WebSocket_Disconnected() is fired even when the user moves/navigates from one page to another, so this will not serve the purpose.

I even tried Sub Page_ParseEvent() and eventName = "beforeunload", but this also doesn't serve my purpose.

Is there any way (event) in ABM that will be fired when the browser or tab in the browser is closed ?
 
Top