Welcome Guest, Not a member yet? Register   Sign In
how do i notify users when their sessions has timed out
#5

(This post was last modified: 07-28-2017, 03:54 PM by skunkbad.)

(07-28-2017, 10:45 AM)PaulD Wrote: OOoooh. That is a really good idea. Was just looking at how to do this myself and was stuck. But that is a really cool plan. Not sure how to do that in js but it is a good sounding approach. Thanks.

Paul.

I've never actually done this. I was just thinking as I was typing. I think you could do the looping with setInterval, like this:

https://stackoverflow.com/a/1542294

Get the epoch time in javascript:

https://stackoverflow.com/a/9456144/667090

Put the epoch time of session expiration in a hidden input so javascript can see it easily....

If expiration is less than X seconds, add a class or attribute to hidden input, so that the loop quits checking the time, then pop up the modal ....
Reply


Messages In This Thread
RE: how do i notify users when their sessions has timed out - by skunkbad - 07-28-2017, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB