Say you have a single-page app with some JavaScript that has a few different pieces of functionality:
location.reload() if some new changes to the codebase are deployed.What happens in these scenarios across browsers:
For 2 and 3, there are two additional cases:
What happens here to the timers and server-sent events / websockets? Do they still work? If you start the 15 minute timer, then close your computer for 20 minutes, and open it back up, and never focus back in on the tab, will it log you out?
A few years ago I implemented a "logout after x interval of time" piece of functionality, like your bank probably has. But I forget exactly the intricacies of how it works in these situations, so it would be helpful to write them down as notes for the next person to benefit from.
From my understanding and basic/partial tests:
To summarize: