Hi all,
I am working on access log function which is to capture the duration of session on application, the question is, How could I capture the “Session Expire” & “Browser Closed” event on Wisej application. Thanks a lot
Hi Ben, a session timeout of 3600 is 1 hour. There is no way to detect when the browser is closed, there isn’t such an event in javascript. Closing the browser is identical to hitting refresh. Are you using a custom countdown in Application.SessionTimeout? The built-in one counts down the session-timeout seconds and then terminates the session on the client which causes the server to dispose the session immediately.
I’d reduce the session timeout to 1 minute or 3 minutes. The session will never timeout until there is user activity anyway. Or you can override ApplicationSessionTimeout and decide when to terminate. To force the disposal of a session use Application.Exit().
The Application.ApplicationExit event is fired when the session is disposed.
There is no Browser Closed event. There is no way with any browser to detect when a browser is closed. The window.onbeforeunload and window.onunload events (see https://developer.mozilla.org) fire when refreshing, changing the url, navigating.
Please login first to submit.