DEV Community

Cover image for Chrome forgets where your tabs have been. Back Pocket doesn't
MarshalX
MarshalX

Posted on Edited on

Chrome forgets where your tabs have been. Back Pocket doesn't

Chrome lets you save a tab group. Close it, reopen it later, and every tab comes back on the right page. Press Back, though, and nothing happens: Chrome saved where each tab is, not where it had been.

I wanted the whole thing back, so I built Back Pocket, a Chrome extension that saves tab groups with each tab's Back history.

What it keeps

Back Pocket follows each tab's Back and Forward pages as you browse, up to 50 a tab, the most Chrome itself keeps. It records only the addresses, never what was on the pages, and all of it stays on your computer.

Giving it back

Saving the history turned out to be the easy half. Chrome has no way for an extension to hand a tab a history, and getting it to accept those pages as real Back entries was the hardest part of the whole project, and the part I'm proudest of.

It works now: restore a group with its history, and each tab's Back button goes where it went before. While that runs, Chrome shows its "started debugging this browser" bar, because that is the only access Chrome gives an extension to a tab's history. The bar goes away when the restore is done, and a plain restore never shows it.

Not paying for it in memory

Restoring a 30-tab group shouldn't load 30 pages. Restored tabs load only when you click them, so even a big group costs almost nothing until you use it.

What I'd tell anyone building something similar

  • Measure what Chrome actually does. The documentation and the browser don't always agree, and only a test tells you which one is right.
  • If people will see a warning, explain it before they do. A debugging bar nobody expected looks alarming; one you were told about is just a step.

Back Pocket is free on the Chrome Web Store: https://chromewebstore.google.com/detail/hpihlojfcfnmcnaafeepfdgbfjoipfkb. More about it at https://backpocket.marshalx.dev, and what else I make at https://marshalx.dev.

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.