Detect Browser or Tab Close Event

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

Hi,

I want to log user’s activity to a database table during login, logout, session expired and when browser is closed. How do I detect or intercept when a user closes the browser, tab, exit menu and Alt-F4?

A small sample would be highly appreciated.

Thanks.

  • You must to post comments
0
0

Unfortunately for a browser there is no difference between closing the browser, closing the tab, refreshing or navigating.

Wisej has a keepalive system that will detect a dead session and kill it. You can handle Application.ApplicationExit to know that the session has been disposed. You cannot really do much in ApplicationExit since the session is already gone. The wisej objects (windows, controls, etc) are available , but if you change them the changes are lost.

You can also handle Application.SessionTimeout which occurs right before removing the session. In SessionTimeout you can still handle objects in that session.

 

  • You must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json