Introduction
Too many open browser tabs can quietly eat memory and fracture your focus. One developer faced exactly that problem with around forty tabs sitting idle, consuming roughly two gigabytes of RAM. Chrome's built-in tab groups and memory-saving features didn't address the core anxiety: the fear of losing a page forever. The solution was a lightweight extension that captures every open tab, stores the list locally, closes the tabs, and brings them back as a single scrollable column with one click.
What Happened
The author set a strict budget before writing any code: a tab manager should not become a memory hog itself. The final package spans 69 files and about 136 kilobytes, requests only four permissions—tabs, storage, context menus, and alarms—and makes no network requests. There is no build step and no bundler, just plain DOM JavaScript.
The collapse operation follows a deliberate sequence. First, the extension queries all tabs in the current window and filters out pinned tabs and any URLs that cannot be safely restored, such as internal chrome:// addresses. It writes the surviving entries to local storage before closing anything. If storage fails, the tabs remain open. Only after the manager page is open does the extension remove the original tabs, so the user never stares at an empty window wondering where their pages went.
A single normalization function acts as a gatekeeper for every tab list, whether it comes from the live browser, an imported file, or an older storage format. It validates protocols, trims entries, removes duplicates by URL rather than title, and guarantees that malformed data never reaches the interface.
The post also covers an undocumented Chromium field called spaceId, used by Yandex Browser to separate tabs into distinct spaces. Because Chrome's API documentation does not mention it, the code guards access with type checks. Restoring tabs in Yandex requires grouping saved entries by spaceId and waiting roughly 350 milliseconds after switching spaces before creating new tabs, otherwise they land in the wrong location.
Manifest V3 introduced additional complications. The daily backup runs through chrome.alarms inside the service worker, which cannot import external modules without a bundler. This forced a duplicated storage module in the background script. Alarms must also be recreated on installation and startup, and context menu creation requires handling runtime.lastError to avoid console noise during review.
Storage limits are another practical concern. With roughly 200 bytes per tab entry, the default five-megabyte quota can fill up if a user saves many large snapshots. The extension keeps only the newest backup and skips snapshots that are identical to the previous one.
Finally, the export feature generates a self-contained HTML file as a Blob. It includes inline CSS, dark-mode support, a search filter, and an "open all" button. Every interpolated string is escaped to prevent JavaScript injection when the exported file is opened from file://.
Why This Matters
Browser tab overload is a common productivity problem, but most solutions either rely on cloud sync or add their own overhead. This extension demonstrates that a useful tab manager can run entirely offline, respect user privacy by avoiding telemetry and accounts, and remain small enough to install without hesitation. The engineering choices—validation at the boundary, write-before-close ordering, and careful Manifest V3 handling—offer a template for anyone building browser extensions that manage sensitive user data.
Key Takeaways
- Save tab data to local storage before closing tabs to prevent data loss.
- Normalize every input through a single validation function to block malformed URLs and duplicates.
- Manifest V3 service workers cannot import modules without a build step, which can lead to code duplication.
- Chrome alarms must be recreated after installation and browser startup.
- Exporting data as a self-contained HTML file removes the need for a backend.
- Localization can significantly increase installs in non-English markets without adding meaningful bundle size.
Conclusion
The result is a free Chrome Web Store extension called Tabs in One. It requires no account, collects no telemetry, and includes its source code in the package for anyone who wants to inspect or adapt it. The author notes three changes they would make next time: add a small build step to eliminate duplicated logic, avoid innerHTML entirely by using a tiny safe parser, and set an uninstall URL from day one to learn why users leave. For developers facing tab clutter, the project shows that a focused, privacy-first tool can be built with modest resources and still solve a real daily problem.

Discussion
Join the conversation
Thoughtful reactions, questions, and follow-up ideas help shape the next story.