Why online timers run late in a background tab
Browsers slow down repeating timers in hidden tabs (Chrome can drop them to once a minute) and may freeze pages when a phone screen turns off. A web timer that subtracts one second at a time can then ring late or stop. Working from the end time and setting a single alarm for the moment it ends keeps it on time in a hidden tab, but no web timer can ring once the tab is closed or the device sleeps.
Chrome's rules for timers in hidden tabs
Chrome's developer documentation describes three levels for page timers (setTimeout and setInterval) when a tab is hidden (2026-10-14):
- If the page is visible, or has played sound in the last 30 seconds, timers are barely slowed. A silent audio track does not count.
- Otherwise timers are checked in batches once per second.
- If the page has been hidden for more than 5 minutes, the timer has been chained five or more times, and the page has been silent for 30 seconds, timers are checked only once per minute (since Chrome 88).
A countdown that re-arms itself every second falls into that last group. Its numbers jump a minute at a time and the end sound can be close to a minute late. The documentation does not give figures for Safari or Firefox, so they are not stated here.
Phones can pause the page completely
The same documentation explains that browsers "freeze" pages to save CPU and battery, and that JavaScript timers do not run while a page is frozen. This can happen when you switch apps or the screen turns off. How soon each browser freezes a page was not checked.