Chrome Auto-Refresh
Chrome Auto Refresh does one thing — reload tabs on a schedule — and the real engineering story is in how much iteration went into making that one thing reliable under Chrome’s Manifest V3 constraints.
The Problem
Chrome can discard inactive tabs to save memory, and Manifest V3 service workers can be killed and restarted by the browser at any time. A naive auto-refresh extension built with a simple setInterval() breaks under both conditions — the timer just disappears. Building something that actually keeps refreshing reliably, across tab suspension and service worker restarts, is a harder problem than it looks.
What It Does
Per-tab refresh intervals with independent timers, a live countdown badge on the extension icon, and persistence that survives the two things that kill naive implementations: tab discarding and service worker restarts.
The Real Engineering, From the Version Log
Persistence across restarts (v0.2.2): Paused timers resume using their leftover delay after a service worker restart — the extension rehydrates alarms precisely rather than resetting them, so a tab that had 12 seconds left before a restart still has 12 seconds left after.
Live countdown (v0.3.0): The popup shows a real countdown to the next refresh, freezing on manual navigation and hiding when timers stop. The service worker exposes remainingMs and nextRunAt so the popup always reflects real state, not a guess.
Badge sync (v0.3.1–v0.3.2): The toolbar badge itself now shows the countdown (“45s”, “2m”, capping at “99+”), updating every second, without needing the popup open.
Tab suspension handling (v0.3.2): Timers persist when Chrome discards an inactive tab, with stale-entry cleanup so discarded tabs don’t leave orphaned timers behind.
Test discipline: The extension carries a real, growing Jest suite — 65 passing tests as of the current version, including a specific fix where 9 new normalizeTabId() validation tests caught a NaN/Infinity handling bug that had been sitting in the interval logic. There’s also a Puppeteer end-to-end smoke suite covering real multi-tab and manual-reload scenarios, and a documented ADD_TESTS.md roadmap for coverage gaps that haven’t been closed yet.
Why This Matters
None of this is visible from the outside — the extension just refreshes tabs. But “just refreshes tabs, reliably, even when Chrome tries to kill the timer” is a materially harder engineering problem than it sounds, and the version history is a real record of finding and closing those gaps one at a time rather than shipping once and walking away.
Download & Install
Chrome Web Store: Chrome Auto Refresh
Version 0.3.2. 65 passing tests. Actively maintained.