Cross-Origin Storage
- Category
- Offline / Storage
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: https://github.com/web-platform-tests/wpt/pull/61811
Summary
Cross-Origin Storage (COS), is a content-addressable browser cache that shares files across origins by hash, with k-anonymity-based availability gating to prevent cross-site tracking. It provides a secure mechanism for web applications to store and retrieve large files across different origins. Utilizing cryptographic hashes to identify and verify files, this feature allows developers to share common assets—such as AI models, WebAssembly modules, and popular JavaScript libraries—across multiple domains without redundant downloads. The hash is the key for the resource and sharing doesn't depend on fetching the resource from a shared location. This significantly reduces network costs, startup latency, and client-side storage overhead while maintaining strict user privacy and security boundaries.
Motivation
Without a standardized way to share stored assets across different domains, web applications that rely on large files are forced to download and store them redundantly. For example, when multiple sites utilize the exact same multi-gigabyte AI model or large WebAssembly module, users must wait for the same massive files to download repeatedly, consuming vast amounts of network bandwidth and valuable client-side disk space. Traditional HTTP caching cannot solve this because browsers partition caches by the top-level origin to prevent cross-site tracking and side-channel attacks. The Cross-Origin Storage API resolves this conflict by establishing a secure, opt-in mechanism to query and share verified resources across origins based solely on their cryptographic hashes, which eliminates wasteful duplicate downloads while fully preserving modern privacy boundaries.
Standards & signals
- Specification: https://wicg.github.io/cross-origin-storage
- Firefox: Under consideration
- Safari: No signal
- Web developers: Positive — Three popular web AI frameworks, Transformers.js , WebLLM (via Apache TVM), and wllama have already implemented this API based on an extension that implements the API. The LiteRT-LM JS team at Google is working on adding support. https://github.com/huggingface/transformers.js/pull/1549 https://github.com/apache/tvm/pull/18893 https://github.com/ngxson/wllama/pull/248 WebLLM filed feature requests for both Mozilla and WebKit: https://bugzilla.mozilla.org/show_bug.cgi?id=2071521 https://bugs.webkit.org/show_bug.cgi?id=324017 The Flutter framework added support to Flutter's web target. https://github.com/flutter/flutter/pull/184149 [full disclosure: PR by one of the feature owners] The Emscripten compiler toolchain for WebAssembly added support. https://github.com/emscripten-core/emscripten/pull/27066) [full disclosure: PR by one of the feature owners] The SQLite Wasm project added to their WebAssembly build of SQLite. https://github.com/sqlite/sqlite-wasm/pull/179 The Google Fonts team supports the addition of the `<cross-origin-storage>` URL request modifier. https://github.com/w3c/csswg-drafts/issues/14056 The Nuxt team has created `vite-plugin-cross-origin-storage`, the core Vite plugin for content-addressed chunking, bottom-up hashing, and the runtime loader, as well as `nuxt-cos`, a thin Nuxt module wrapping the plugin. https://github.com/danielroe/cross-origin-storage The Prebid.js team is working on adding support to its highly popular header bidding library. https://github.com/prebid/Prebid.js/pull/15329
- Tracking bug: https://crbug.com/547587764
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=cross-origin-storage
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Cross-Origin%20Storage
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Cross-Origin%20Storage
- Baseline status: https://webstatus.dev/?q=Cross-Origin%20Storage
Samples: https://chromewebstore.google.com/detail/cross-origin-storage/denpnpcgjgikjpoglpjefakmdcbmlgih https://apps.apple.com/app/cross-origin-storage/id6788319695 https://addons.mozilla.org/en-US/firefox/addon/cross-origin-storage https://github.com/tomayac/awesome-cross-origin-storage
Explainers: https://github.com/WICG/cross-origin-storage/blob/main/README.md