liveBook · Manning

Storage bucket

As explained in Vanilla Web

An experimental browser API proposal for grouping an origin's data under separate lifetime and eviction policies.

Browser storage belongs to a security context, not to a global user account. In the common case, data is scoped by origin, but the web client, device, operating system account, and browser privacy rules can further determine where it lives. The same site may therefore have separate data in a browser tab, an installed PWA, and an in-app browser. section 12.4.1

Storage Buckets is an experimental proposal for a more explicit arrangement: an origin could group data into separate buckets with different lifetimes and eviction policies. For example, critical user data could be kept apart from temporary caches so the browser can reclaim less important data first. This does not make either bucket a secure vault: users and scripts running under the origin can access browser storage. section 12.4.3

Treat bucket separation as an optional enhancement, not a requirement for reliable storage. Storage Buckets are not part of Baseline and are available only in some Chromium-based browsers. Even a persistence request does not protect data against user deletion, profile removal, device resets, uninstall flows, or application bugs. Plan for data to be missing, and do not assume it will appear in another browser or on another device. section 12.4.3 section 12.4.1

How Vanilla Web covers it

How deep it goes
Defines the proposal and its limits, but provides no bucket-creation API or implementation walkthrough.
Examples
Contrasts critical user data with temporary caches and illustrates separate storage across browsers, PWAs, and in-app browsers.
What it assumes
Assumes familiarity with origins and client-side storage while explaining that browser data is not a global user account.
What you can do after
Evaluate/understand when separate eviction policies would help without assuming bucket support or guaranteed data retention.
How it connects
Connects origin-scoped storage to partitioning, quotas, persistence, eviction, and Cross-Site Scripting.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vanilla Web. The section links point to the parts of the book it draws on.