jquery / codeorigin.jquery.com

jQuery CDN
https://releases.jquery.com
Other
55 stars 605 forks source link

Provide Brotli compression #62

Open Krinkle opened 3 years ago

Krinkle commented 3 years ago

Split from https://github.com/jquery/codeorigin.jquery.com/issues/38.

I have tested the latest jQuery version at code.jquery.com using Gzip and Brotli Compression Level Estimator and there is room for improvement:

jquery test

timmywil commented 1 week ago

We were recently addressing an issue with gzip on the CDN and discovered that gzip performs better than brotli for most jQuery files. Perhaps this issue can be closed?

mgol commented 1 week ago

This was the default Brotli that Fastly provided IIRC? Perhaps it’s just using poor settings. Proper Brotli would be way smaller than that.

It makes sense to do this IMO but we’d have to provide the Brotli versions by ourselves.

timmywil commented 1 week ago

It doesn't say what compression level is used, but Brotli does require more resources so I could see Fastly keeping the level low to avoid that. I'd rather not get into providing Brotli versions ourselves, but perhaps we could play with nginx settings so brotli is supported at the origin. But, it could have the same issues as we had with gzip where the origin is not always consulted, in which case it may end up using Fastly's gzip version anyway.