timer throttling
A browser slowing down or pausing timers and animation callbacks in tabs or frames the user cannot see, to save power.
In more detail
requestAnimationFrame stops completely in hidden tabs and timers are limited to run at most about once a second or less. That saves battery but means background tabs cannot rely on precise timing.
Related terms
- requestAnimationFrame() — A function that schedules a callback to run just before the browser's next repaint, the right place to update animations.
- setTimeout — A JavaScript function that runs a callback once after at least the given number of milliseconds, unless clearTimeout cancels it first.
Taught in
- requestAnimationFrame vs requestIdleCallback: High-FPS Work — Frontend Architecture & Web Platform