Experimenting with the proposed Cross-Origin Storage API in Transformers.js
AI-generated summary of reporting by Huggingface Blog. Read the original for the full story.
Why it matters
Browser-cached AI model files are re-downloaded per origin today; an experimental cross-origin shared cache in Transformers.js 4.2.0 could eliminate hundreds of megabytes of duplicate downloads.
A Google Chrome engineer writing on Hugging Face's blog explains an early browser proposal called Cross-Origin Storage. Today, when two different websites use the same AI model, like the Whisper speech-recognition model, each site makes your browser download the same large files again, wasting storage and time. The proposal lets browsers share these files across websites, identifying them by a cryptographic fingerprint instead of by site. No browser supports it natively yet; developers can try it via an extension or an experimental flag in Transformers.js.
Web apps running AI models in the browser currently re-download identical files per site, the article's example wastes 177 MB of duplicate Whisper weights, because caches are isolated by origin for security. Google Chrome's Thomas Steiner proposes Cross-Origin Storage, keyed by SHA-256 hash, with Transformers.js 4.2.0 already piloting it behind an opt-in flag. The API is not standardized or natively implemented, and privacy mitigations for rare files are still undecided. Cost savings for bandwidth and storage are real but deferred until browsers ship it.
The proposal adds navigator.crossOriginStorage, modeled on OPFS's getFileHandle(), keyed by SHA-256 rather than URL. Writes verify the hash, giving automatic integrity checks; origins controls visibility ('*' global, list-restricted, or same-site) and can be upgraded but never downgraded to prevent narrowing attacks. Timing-attack-driven cache partitioning (Network Isolation Key) is the problem; mitigations like availability gating for rare hashes are unresolved. Transformers.js PR #1549 enables it via env.experimental_useCrossOriginStorage, resolving hashes from Xet pointer files.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Transformers.js Cross-Origin Storage API Chrome ONNX Runtime Hugging Face Hub jsDelivr CDN OPFS
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Samsung is testing a feature that changes the angle of photos you’ve already taken
Samsung’s new Recompose lets users change photo angles after shooting, potentially reducing the need for multiple shots and improving post-capture editing workflows for photographers and casual users alike.
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
datasette-charts 0.5a0
Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.