Why browser timers stop when you close the tab
If you've ever set an online timer, switched tabs, and come back to find it behind — or an alarm that never rang — here's what's really going on, and how to avoid it.
Background tabs get throttled
To save battery and CPU, browsers deliberately slow down inactive tabs. Timers scheduled with
JavaScript (the usual setInterval approach) can get throttled or paused. A timer that counts its own ticks therefore drifts:
it "loses" the time the tab spent in the background.
Closing the tab stops everything
A web page only runs while it's open. Close the tab or quit the browser and its code stops immediately — so no website can play a sound or fire an alarm after that point. This is a platform rule, not a limitation a particular site can engineer around. It's why even good tools honestly say "keep the tab open."
How to keep an online timer reliable
- Use a clock-based timer. Clockfresh computes the remaining time from the real wall-clock, not from accumulated ticks — so it recalculates correctly when the page updates after backgrounding, throttling or a reload.
- Allow notifications. Notifications give the page another way to alert you when supported, but they still depend on browser permission and platform behavior.
- Keep the tab open (or install Clockfresh as an app) for the most reliable alarm. For a closed-device wake-up, your phone or OS clock is the right tool.
- Tap once first. Browsers block automatic audio until you interact — starting the timer enables its sound.
Try it
Set a quick timer or an alarm and switch tabs — it will recalculate from the real clock when you come back. For focus work, the 25-minute timer is a good start.
Questions
- Why does my online timer pause in a background tab?
- Browsers throttle inactive tabs to save battery — JavaScript timers slow down or stop firing. A timer that counts ticks can fall behind. Clockfresh avoids tick-count drift by reading the real clock, so the remaining time is recalculated when the page updates.
- Can a website alarm ring after I close the browser?
- No. Once the page is fully closed, its code no longer runs — no website can ring then. Keep the tab open (you can install Clockfresh and leave it running), or use your phone/OS alarm for closed-device wake-ups.
- How does Clockfresh stay reliable?
- It stores the target time and recomputes from the real clock. It also requests notifications and wake lock where supported, but alarms still need the page or installed web app to remain available.