Hugging Face’s Transformers.js experiments with proposed Cross-Origin Storage API to reduce redundant model downloads
The browser-based AI library Transformers.js explores a new web API to share cached model and runtime files across websites, cutting redundant downloads and storage for popular AI models.
1 source · cross-referenced
- Transformers.js, a browser-based AI library, currently re-downloads and caches identical model and WebAssembly runtime files across different websites due to browser cache isolation.
- A proposed Cross-Origin Storage API could let websites share cached AI resources by cryptographic hash, avoiding duplicate downloads of popular models like Whisper and DistilBERT.
- Hugging Face demonstrates the issue with a 177 MB duplicate download for a single model and a 4.7 MB duplicate WebAssembly runtime across origins.
Hugging Face’s Transformers.js enables web developers to run AI pipelines directly in the browser, automatically downloading and caching model resources and WebAssembly runtimes on first use. However, because browsers isolate caches by origin, revisiting the same app on a different origin triggers redundant downloads even when the files are byte-for-byte identical.
In a demonstration, Hugging Face showed that visiting a second origin serving the same automatic speech recognition model (Xenova/whisper-tiny.en) resulted in an additional 177 MB of duplicate downloads and storage. Similarly, a shared WebAssembly runtime file used across multiple models added another 4.7 MB of redundant downloads per origin.
The root cause is browser cache isolation enforced via a Network Isolation Key that combines the top-level and current-frame sites, preventing cache hits even when the resource URLs are identical. This behavior, while improving security and privacy, creates inefficiency for popular AI models reused across many websites.
To address this, the proposed Cross-Origin Storage (COS) API introduces a navigator.crossOriginStorage interface that stores and retrieves large files across origins using cryptographic hashes rather than URLs or origins. This would allow browsers to recognize identical files regardless of the site they come from, reducing redundant downloads and storage.
Hugging Face notes the COS API is an early-stage proposal without native browser implementation, but developers can experiment now using a browser extension that injects a polyfill for navigator.crossOriginStorage.
- Jun 23, 2026 · TechCrunch — AI
OpenAI and Trail of Bits launch "Patch the Planet" to audit open-source code with AI assistance
Trust71 - Jun 23, 2026 · TechCrunch — AI
Anthropic launches Claude Tag in research preview to capture enterprise context in Slack
Trust76 - Jun 23, 2026 · TechCrunch — AI
Fika Jobs raises $4M to build AI-powered video hiring platform
Trust79