Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
How to clear/Log out the user session when the window is closed rather than clicking the Logout button
Unfortunately there is no way to do this at this time, you will have to depend on the Session timeout setting.
You could probably do it with a Widget Extension or maybe even code in the Expression Widget, so it would call the logout specifically before the web page unloads.
With a private window, when this one is close, the user session will be cleared / logged out.
I think that is browser's feature though.
It's the same behaviour with Safari, Chrome and Firefox. All the browsers' tabs must be closed. Maybe it's the result of a combination of ThingWorx webapp and browser's cache. If the browser's cache could be always cleared/empty, then closing the window might resolve the problem.
Closing a private browser window isn't the same as logging out; the session stays open, but is inaccessible (look in tomcat manager to see all the open sessions).
Like stopping your car by shutting off the engine (closing the session), or letting it run out of gas (just closing the private browser window).