Chrome extension/Productivity/Working

Smart Tab Sleeper

Discards tabs that have been idle past a time limit, skipping active, pinned, audible and allow-listed ones.

Built with
  • JavaScript
  • chrome.tabs.discard
  • chrome.alarms
Runs as
Popup · Service worker
Status · v4.2.0
Plain JavaScript; loads unpacked as-is. The memory figures it shows are a flat estimate, not a measurement.

§ 01

What it is

Puts background tabs to sleep with Chrome's own discard feature once they have been idle for a set time, freeing their memory. A discarded tab reloads when you return to it.

§ 02

Screenshot

Smart Tab Sleeper popup with settings, tab counts and a list of tabs showing idle or slept time
The popup with sample tabs: sleeping, idle and allow-listed.

Real screenshots of the extension's own interface; some show sample content.

§ 03

How it works

  1. 01

    The worker records when each tab was last activated or finished loading.

  2. 02

    A repeating alarm checks every tab; any tab idle past the limit is discarded, unless it is active, pinned, playing audio or on the allow-list.

  3. 03

    The popup lists tabs by idle or slept time, with Sleep and Open buttons, and holds the settings: on/off, idle seconds, list refresh interval and allow-list.

§ 04

Key features

  • Configurable idle limit and domain allow-list, synced with chrome.storage.sync.
  • Never discards active, pinned or audible tabs.
  • Manual sleep and open from the popup.
  • Counts of open and sleeping tabs.

§ 05

Permissions & browser APIs

tabs
Reads tab state and discards idle tabs.
alarms
Runs the periodic idle check from the service worker.
storage
Keeps activity times and settings.

§ 06

Hard parts & limits

  • Memory per tab is shown as a fixed 120 MB estimate; the extension does not measure real usage.