Written by

Question Nezla · Mar 8, 2023

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?

Thanks

Product version: Caché 2014.1

Comments

John Murray · Mar 9, 2023

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.

0
Nezla  Mar 9, 2023 to John Murray

Thanks John

0