Post

wouldn't it be nice if sites could share a cache of common js? ... stuff like react, or vue or svelte? 👉 there's an early stage proposal for cross-origin storage which enables exactly this. there are challenges but I think it's very interesting indeed

github.comGitHub - WICG/cross-origin-storage: Explainer for the Cross-Origin Storage (COS) APIExplainer for the Cross-Origin Storage (COS) API. Contribute to WICG/cross-origin-storage development by creating an account on GitHub.

I recall seeing several proposals about popular library caches in the past decade. The general consensus was that it wasn’t worth it, and people didn’t want “blessed” libraries to gain an advantage that could hinder web progress. Is this proposal different in some way?

It's different in that it's hash-based, so we don't need to agree on the same CDNs (as when before the caches were isolated by origin). This means the cache hit rates would improve, as we work directly with fullstack frameworks like Nuxt, so they can consider COS at build time.

No replies yet.