Published Tabzero Team· Updated

Chrome Storage API for Tab Sessions: local, sync, and session

Saving a list of tab URLs is a storage design problem as much as a tabs API problem. chrome.storage.local, sync and session have different lifetimes and limits. Pick the area based on the meaning of the data, not the convenience of one method call.

Chrome Storage API for Tab Sessions: local, sync, and session

Match data to its lifetime

storage.local keeps extension data on the device until the extension is removed and currently has a 10 MB default quota. storage.sync is for small settings that can follow a signed-in user when Chrome Sync is enabled; its total quota is about 100 KB with an 8 KB per-item limit. storage.session is in-memory extension state cleared on browser restart, extension reload, disable or update.

A saved research note or selected URL list should not live only in storage.session. A temporary mapping from a live tab ID to a UI selection may fit there. Keyboard preference or color settings may fit sync if they are small and the product explains sync behavior.

Do not confuse storage.session with chrome.sessions

The similarly named APIs solve different problems. chrome.storage.session stores temporary extension data in memory; chrome.sessions queries browser-managed recently closed tabs and windows. Neither is a substitute for a durable project record with a verified restore path.

Name data structures around their job: draftSelection, savedSources or userSettings. Clear names reduce the chance that a future change moves durable records into an ephemeral area.

Write records that can survive changing tab IDs

A durable source record should include its own ID, a validated URL, a human-readable label and a creation or update time. The live tab ID can be stored as a temporary hint but should not be the primary key. After restart, query open tabs and reconnect by reviewed URL or user action.

Store only data the feature needs. Avoid copying complete page text or sensitive query parameters into sync storage by default. If a note contains private research, give the person an understandable storage and export story.

Chrome Storage API for Tab Sessions: local, sync, and session contextual product example
An example browser-tab view for finding, selecting and returning to the pages that belong to a task. Credit: Tabzero.

Handle quotas, updates and visibility

chrome.storage.set() can reject when quotas are exceeded. Catch the error and keep the user's current selection visible so they can retry or export it. Avoid writing on every tab update; batch meaningful changes and use storage.onChanged to refresh open extension views.

Chrome documents that local and sync are exposed to content scripts by default, while session is not. setAccessLevel() can restrict access. Decide whether a content script truly needs direct access instead of assuming every extension context should read the same records.

Idea: a recoverable session-note model

Separate a project note from its source links and from transient browser state. Keep the note and source list in durable storage or the user's account, and keep live tab IDs in session state. Provide Markdown export so the written conclusion has a portable copy.

A small restore test should reload the extension, restart the browser and reopen one saved source. If the record disappears or the link no longer makes sense, fix the storage model before adding more automation.

Test offline and failure cases

Fill a test profile near the quota, disable sync, reload the extension and clear a temporary session area. Observe what remains and what errors the interface shows. Test removal of the extension only in a disposable profile because local extension data can be cleared.

Use the documented storage quotas as design constraints, and re-check the current API reference before shipping. Limits and browser behavior can change over time.

Tabzero: Browser Tab Manager & Notes

Save tab links, keep notes beside your sources, and return to what matters. Tabzero is in development preview; AI Notes remains planned.

Check availability