3 ms·
All browsers already heavily throttle js timers execution in background tabs. You also have specific apis like requestAnimationFrame to decouple UI timers from
by jakub_g 3y ago
All browsers already heavily throttle js timers execution in background tabs. You also have specific apis like requestAnimationFrame to decouple UI timers from non-UI timers like setInterval.
Stopping it entirely and then suddenly restarting on foreground would be probably too much of a breaking change for the websites' developers. I mean, I guess it could be possible but would require properly thinking it through. Some browsers aggressively freeze background tabs but AFAIR they do full reload on unfreeze.
The breakage area of shipping that kind of change into the web ecosystem of a major browser is huge.