I was tracking down some ridiculously high load times that my app\'s javascript reported, and found that Android (and iOS) pause some JavaScript execution when the window is
There is few options to check it:
Using Visibility API
Using focus and blur events to detect browser tab visibility:
window.addEventListener("focus", handleBrowserState.bind(context, true));
window.addEventListener("blur", handleBrowserState.bind(context, false));
function handleBrowserState(isActive){
// do something
}