A curated list of resources for the Cross-Origin Storage (COS) API, a proposed Web platform API that lets sites store and retrieve large, content-addressed resources, such as AI models, WebAssembly runtimes, Web fonts, and shared libraries, from a shared, cross-origin storage bucket keyed by the SHA-256 hash of a file’s bytes, so the same bytes don’t need to be downloaded again for every origin that uses them. See the Standardization section below for background.
Cross-Origin Storage addresses entries by content: navigator.crossOriginStorage.getFileHandle(hash) looks up an entry by the hash of its bytes, so any origin that stores or requests identical bytes resolves to the same entry regardless of the URL it came from. There’s no traditional browser permission prompt. Access is controlled at write time via an origins option: same-site only by default, an explicit list of allowed origins, or '*' for global availability, and visibility can only become more permissive later, never less.
For privacy, a second, independent gate controls whether the browser discloses that a resource exists to a different origin at all. Only entries on the Public Hash List (PHL), a shared, vendor-neutral allowlist of well-known resources (popular libraries, fonts, WebAssembly runtimes, AI models) that meet a minimum cross-origin popularity (k-anonymity) threshold, can be truthfully reported as present to a requesting origin; everything else returns NotFoundError, the same error used when a file is genuinely absent, so cache state can’t be probed cross-origin. Browsers may also randomly return NotFoundError for files that do qualify (“GREASE’ing”), except where the file is large enough that a spurious re-download would be disproportionate to the privacy benefit.
The API isn’t shipped in any browser yet. The projects below currently build against a browser extension (see Implementations below) that polyfills navigator.crossOriginStorage.getFileHandle(), origins-based access control, and a PHL gate backed by a live, community-maintained hash list (see Public Hash List below); the exact gating behavior is still evolving along with the spec. Besides the imperative JS API, the spec also proposes declarative integration via a crossoriginstorage attribute on HTML <link>/<script>, a crossOriginStorage import attribute for JS module imports, and a new <cross-origin-storage> request-url-modifier usable inside CSS url(), for example in @font-face. A fourth integration covers the imperative case: a crossOriginStorage option on fetch()’s RequestInit.
Browser extensions that polyfill the proposed API.
navigator.crossOriginStorage.getFileHandle() into every page. (source)navigator.crossOriginStorage.getFileHandle() into every page. Same source as the Chrome extension above.navigator.crossOriginStorage.getFileHandle() into every page. Same source as the Chrome extension above.Projects that have added Cross-Origin Storage support, typically as an opt-in progressive enhancement layered on top of the extensions above.
LanguageModel); shares the AI model via Cross-Origin Storage when its WebLLM backend or Transformers.js backend is enabled. (source)nuxt-cos, a thin Nuxt module wrapping it.Native (non-polyfilled) implementations of Cross-Origin Storage in browser engines, ready for testing. Unofficial personal forks, not yet upstreamed.
Infrastructure behind the PHL availability-gating allowlist described above.
Working examples of Cross-Origin Storage sharing real-world assets between unrelated origins.
cross-origin-storage() function, the declarative HTML crossoriginstorage attribute, and declarative JS import attributes.sqlite3.wasm across origins. (source).npy tensor files are packed into one content-addressed bundle, so a model fetched by one deployment loads from Cross-Origin Storage on the other. (source, mirror source)<cross-origin-storage> request-url-modifier used in CSS url().crossoriginstorage attribute - Proposal to add the crossoriginstorage attribute to <link> and <script>.crossOriginStorage import attribute - Proposal to add the crossOriginStorage import attribute for JS module imports.crossOriginStorage request option - Proposal to add a crossOriginStorage option to RequestInit, so imperative fetch() calls can opt into Cross-Origin Storage alongside integrity.web-features entry request - Request to add Cross-Origin Storage as a tracked feature in the web-features project.Contributions welcome! Read the contribution guidelines first.
This work is licensed under a CC0 1.0 Universal license.