Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gstatic, CDNs, and per-domain caching policy #1046

Open
donmccurdy opened this issue Feb 2, 2024 · 1 comment
Open

Gstatic, CDNs, and per-domain caching policy #1046

donmccurdy opened this issue Feb 2, 2024 · 1 comment

Comments

@donmccurdy
Copy link
Contributor

donmccurdy commented Feb 2, 2024

The repository contains a number of references to this idea:

It is recommended to always pull your Draco JavaScript and WASM decoders from this URL. Users will benefit from having the Draco decoder in cache as more sites start using the static URL.

While this was accurate when it was written, it isn't how browser caches have worked since about 2021. See:

https://www.stefanjudis.com/notes/say-goodbye-to-resource-caching-across-sites-and-domains/

Starting with v86, Chrome will be using combined cache keys, too... If your sites request the global jQuery, modules from unpkg.com, font files from Google fonts or GA's (Google Analytics) analytics.js, users will redownload the resources no matter if they downloaded and cached them for other sites already.

That being the case, it would be really nice if Draco were available from the npm package registry where web developers usually find dependencies. The Draco builds currently published there work only in Node.js, but the registry is designed to handle dependencies for web, Node.js, and other JavaScript runtimes. I think @bhouston's suggestions on this topic in #977 are excellent, and I'd be very glad to help make that happen.

@bhouston
Copy link

bhouston commented Feb 8, 2024

I could sponsor #977 with an open source bounty of $500 USD if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants