There are a couple of issues here which need to be considered. My examples are from 19.1, I don't know if this has changed in 20. I'm also assuming that your SessionManager.wo is based on cWebSessionManagerStandard.pkg which is certainly what is used in the Examples.

The sequence of events as I understand them, is that the browser makes an Ajax call to Webappserver which includes the cookie. The SessionID in the cookie is tested in the SessionManager's ValidateSession function. It is tested for two things, whether it has timed out and whether WebApSession.Active="Y". In your case it is obviously passing both tests. The only facility to change the status of WebappSession.Active to "N" (invalid) is in the EndSession procedure at the bottom of cWebSessionManagerStandard. This would be called during an orderly logout.

Unfortunately, in your circumstances no logout was performed, just the tab closed. Your friend in this case is the javascript beforeunload event which is triggered in the majority of browsers as a tab is closing and could be captured and used to fire a ServerAction which would send the EndSession procedure in the SessionManager.wo (or your own equivalent).

This link: https://support.dataaccess.com/Forum...nMode-question is a thread which, towards the bottom gives a couple of examples of using the beforeunload event. It's some time since I've played around with ServerActions but there are others here who have lots of experience with them and, if you ask nicely, someone might write you the code you could use.

Good luck,