How to prevent different browsers from freezing its idle tabs?

343 views Asked by At

I am trying to create a session timeout functionality where if the user stays idle for a certain period of time (say session_timeout, a pop up should be displayed on the UI and if still not acted upon then logout automatically.

It works fine if the session_timeout<=20 minutes(approx). But it doesn't work if session_timeout>40 minutes. I don't see any pop up and the user is not logged out either.

My guess is after a certain period of inactivity, the browser freezes its idle tabs thus the timer which was supposed to countdown the session_timeout also stops updating.

Is this a good guess? If yes, how do I prevent the browser from freezing my tab? Are there any other possible reasons why this could be happening?

And what is the best way to implement this functionality?

Please note that I've implemented this in Angular and Javascript.

0

There are 0 answers