cross-origin storage · lab

A test bench for navigator.crossOriginStorage

Serve this page from two different ports and run Store on one and Retrieve on the other.

Origin checking…
SHA-256 of the content Compute the hash to get started.
No events.

With two static servers pointing at the same folder (npx serve -l 5001 and npx serve -l 5002), run steps 1 and 2 on localhost:5001 and step 3 on localhost:5002. If COS works, the second origin resolves the file with zero network requests in the Network panel.

This is not a simulation. The fetch, the SHA-256 via crypto.subtle.digest and the calls to requestFileHandle() are real. The API is not native in any browser: it arrives through the polyfill in the Cross-Origin Storage extension, which stores files in a CacheStorage owned by its own service worker, outside the browser's partitioning.

Heads-up: in the extension options, the Public Hash List filter is off by default. With the PHL off, any hash is revealed as available and the test does not reflect the privacy protection that defines the proposal.