Rochdi Badis · Mar 8

Session ending message

Hi Guys,


I'm using session to save some data eg. login details, data I need earlier, and of course if the screen left idol with no activity the session may time out and I would like to display a message waring the user that their session is about to expire (as some web application do) , so how can do that?



Product version: Caché 2014.1
0 127
Discussion (2)1
Log in or sign up to continue

The technique I have seen used is to run a JS timer which will run for, say, 120 seconds less than the session timeout. Restart the timer each time something happens that will cause the server-side session timeout to restart. When the JS timer expires, display the "2 minutes before timeout" message, perhaps with a countdown run by another 1-second JS timer.