r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
9 stars 2 forks source link

Should we enable compression in nginx #437

Open jeroen opened 3 months ago

jeroen commented 3 months ago

Currently nginx does not compress. We can test locally:

curl --http2 --compressed -v -H "Connection: close" -H "host: ropensci.r-universe.dev" http://localhost/magick/doc/intro.html > out.html

The compression is done by cloudflare. Perhaps doing it in nginx too will increase performance, but perhaps not.

jeroen commented 3 months ago

Also consider https://github.com/r-universe-org/help/issues/436#issuecomment-2198543467 to test if cloudflare really compresses all types on the fly, and how it affects the content-length response header.

See https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/

jeroen commented 3 months ago

Right now I don't think we gain much: