I constantly have multiple Chrome windows open, each with a pile of tabs. One window has a dozen slow analytics queries that I'll check "any minute now." Another has my research on $lookup and $unwind in MongoDB. The third one — with the most tabs — has local school enrollment rules, because life.

Of course, a more urgent task comes up, and the old windows get closed... only for me to resume researching the same topics a week later, unable to remember where I left off. Tab-saving extensions have existed for ages, but reviews regularly complain about data loss — so why not build my own, designed specifically for backup? Every Chrome user already has a Google account, usually with sync enabled. What if I just saved tabs there — no signups, no servers, no subscriptions?

Tab Saver demo
Tab Saver demo

The result is Tab Saver. One click — all tabs saved and backed up to your Google account.

storage.sync

Chrome provides extensions with the chrome.storage.sync API — a storage that automatically syncs across all browsers where the user is logged into the same Google account.

Using it is straightforward:

// Save
await browser.storage.sync.set({ 
  myData: { tabs: [...], savedAt: new Date().toISOString() } 
});

// Read
const result = await browser.storage.sync.get('myData');
console.log(result.myData);

As the name suggests, after browser.storage.sync your data not only gets backed up but also magically appears on other computers logged into the same Google account. The limits are modest but sufficient for syncing tabs: 100 KB total, up to 512 keys, up to 8 KB per item.

Everything sounds great, but there's a catch. Several, actually.

Gotcha 1: "Sync" Doesn't Mean "Backup"

The most painful surprise: when you uninstall the extension, Chrome deletes ALL storage.sync data.

If you remove the extension — say, to reinstall it — after reinstalling, your data is gone. It was deleted along with the extension. Chrome considers extension data to belong to the extension, not the user. Uninstall the extension — delete the data. All you can do is warn users in the UI, which I do. Or add export/import and other backup destinations — that's for version two.

Gotcha 2: identity API Lies Provides Inaccurate Information

For data to sync to Google's cloud, the user needs to be signed in and have either full account sync or specifically "Apps" sync enabled. Unfortunately, Chrome's Identity API only tells you whether full account sync is enabled. Oh well — you can only accurately reflect this in the UI.

const userInfo = await chrome.identity.getProfileUserInfo({ 
  accountStatus: 'SYNC' 
});
// This only confirms that full account sync is enabled
Google account sync settings required for extension data sync
Google account sync settings required for extension data sync

Gotcha 3: Need Email Access Just to Check Status

To call chrome.identity.getProfileUserInfo(), the extension needs the identity.email permission.

In the Chrome Web Store, this appears as "Read your email address." That's not great. A tab backup extension doesn't need your email at all, but without this permission there's no way to check sync status and reassure me that my tabs are being backed up.

Gotcha 4: No Confirmation That Data Actually Synced

storage.sync.set() returns a Promise that resolves when data is written locally. After that, you can only hope it actually made it to the cloud — or check when it arrives in Chrome on your other laptop. Sure, syncing a few tab URLs takes just seconds on office WiFi, but there's no way to know for certain.

There's no API to find out:

  • Whether data synced

  • When it synced

  • Whether there were sync errors

The Good Parts

  • No servers — no backend to maintain

  • No authentication — user is already signed into Chrome

  • Free — Google hosts the data

  • Cross-platform — works on all devices with Chrome

Most importantly — no need to create accounts anywhere. Use Chrome — your tabs are backed up.

Your Experience?

Have you used storage.sync in your extensions? Do you happen to know a reliable way to determine whether data actually made it to the cloud?

P.S.
Изначально опубликовано на моём agilsoftwaredevelopment.com