google / google/draco

Gstatic, CDNs, and per-domain caching policy

Open
#1,046 1 comment 0 reactions 0 assignees View on GitHub
enhancement Feature Request
Dominant language
C++
Stars
7.5k
Forks
1.1k
Avg merge
47m
Merged PRs (30d)
1

Description

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](https://unpkg.com/), font files from [Google fonts](https://fonts.google.com/) 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 https://github.com/google/draco/issues/977 are excellent, and I'd be very glad to help make that happen.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.