A timer that doesn't drift
Deadline-based timing, so background tabs cannot make it wrong. The alarm is armed when you press start, and the page tells you so.
Why online timers are usually wrong
Almost every timer on the web is built the obvious way: start an interval that fires once a second and subtract one from a counter. It works perfectly while you watch it, and fails as soon as you do anything else. Browsers deliberately throttle timers in background tabs to save battery — often to once a second, sometimes far slower — so the counter falls behind real time, and the further behind it falls the longer you leave it.
The fix is not to count at all. When you press start, this page records the exact clock time your timer should end. Every frame it asks the system clock how long is left. Throttling can make the display update less often, but it cannot make the answer wrong, because the answer was never being accumulated in the first place.
The alarm is the part that actually has to work
Accurate timing is necessary but not sufficient, because the thing you rely on is the noise at the end. Scheduling that noise from a JavaScript timer does not survive a background tab: after roughly five minutes hidden, Chrome throttles the page's timers to about once a minute, so a countdown that beeps when its tick notices zero can be a full minute late. Late is the same as broken when it is your oven.
So the alarm is not scheduled from a JavaScript timer at all. The moment you press start, the tones themselves are queued on the browser's audio clock for the exact instant your timer ends. That clock lives on the audio thread and does not care about tab visibility, throttling or what the rest of the page is doing. Once start is pressed, the sound is already committed — the countdown you can see is just the display.
The alarm problem
The second common failure is silence. Browser autoplay policy blocks sound that was not initiated by a user gesture, and a timer that creates its audio at the end of the countdown has no gesture left to point at. The result is a timer that visibly reaches zero and makes no noise — the worst possible outcome, because you trusted it.
Here the audio pipeline is created and unlocked by the same click that starts the countdown, then verified, and the result is displayed under the controls. If it says the sound is armed, it will sound. If it does not, you find out at the start rather than the end.
Bookmark the timer you always use
Put the duration in the address: #25m, #5m, #1h30m. The page starts that timer immediately on load, so the timer you use every day becomes a bookmark or a shortcut rather than four clicks. Times can be written as 90s, 25m, 1h30m or 10:30.