← /projects

Tab Hibernator

A minimal, auditable Chrome/Brave extension that hibernates memory-heavy background tabs by domain.

Tab Hibernator screenshot

The Problem

Heavy sites like LinkedIn keep several background tabs resident in RAM at once. Chrome's native Memory Saver works backwards from what you want here: you give it a keep-active allowlist and it discards everything else on its own schedule, so there's no way to aggressively target the specific domains that hog memory, and no on-demand control.

What I Built

A small Manifest V3 extension with zero dependencies, no content scripts, and no network access, built on the native chrome.tabs.discard() API. The architecture separates pure, headlessly-testable logic (domain matching, discard selection) from the chrome.* glue, verified with the Node standard-library test runner against a fake chrome API. A 360px toolbar popup is the only UI: an auto-hibernate toggle with a configurable idle threshold, a normalized domain list, an Alt+Shift+H hotkey for on-demand discarding, and a two-click "Panic" button that sweeps every eligible background tab except the active one. Settings persist via chrome.storage.sync; a one-minute alarm drives the idle check.

Notable

Deliberately minimal as a security posture: a tiny extension you load unpacked never auto-updates from a third party and can be read end to end, a direct response to supply-chain incidents like The Great Suspender, which had 2M+ installs, was sold to an unknown party, shipped code that could run arbitrary remote scripts, and was force-removed by Google in 2021. Domain matching rejects suffix spoofing such as notlinkedin.com and linkedin.com.evil.com. Because no browser API exposes per-tab memory, the popup guides you to the browser's built-in Task Manager to find the heaviest domains instead of guessing.

Stack

Manifest V3JavaScript (ES modules)chrome.tabs / storage / alarmsNode test runnerHTML / CSS

Status

Open source at github.com/blaizew/tab-hibernator.