Re:Firefox Got Faster for Real Users in 2023
by jakub_g on Tuesday October 31, 2023 @02:45PM
(#38089490)
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.
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.