Caché - Determine how much time is left before a %CSP.Session times out
I want to display to the user on their Zen page how much time is left before their session times out.
I know I can set the %session.AppTimeout to a particular value (or manage this in the Web Application) and I know I can retrieve this value from the %session object. I also know that I can set an event handler to do something when the session has timed out but I cannot find any way to determine how long before the session ends via the application timeout so that I can keep the user informed.
I'm aware the session timeout triggers based on the inactivity of the user but I can't find anything with this value that I can use.
Any help would be greatly appreciated.
You can use 'Server Response Timeout'.
I suggest you include a widget on every page you serve, and make the widget use client-side JS to display a countdown which updates every second. Set its initial value from %session.AppTimeout.
To get the "real" start date/time of a sessions, you will have to dig into the ^%cspSession(sessionID) global.
you might see a date/time on $LG 20 & 21 (depending on your version)