Skip to content

Conversation

soyuka
Copy link

@soyuka soyuka commented Dec 3, 2024

@dunglas could you check? I think that the defaults are fine but you've studied this a bit more then I did. Brotli isn't available out of the box maybe we can add it later (not sure how).

@dunglas
Copy link
Member

dunglas commented Dec 3, 2024

This will work but this would be much more efficient to precompress the binary using Brotli and Zopfli (an efficient Gzip-compatible compressor) and configure Apache like this to serve the compressed file directly: https://blog.desgrange.net/post/2017/04/10/pre-compression-with-gzip-and-brotli-in-apache.html

@derickr
Copy link
Member

derickr commented Dec 3, 2024 via email

@dunglas
Copy link
Member

dunglas commented Dec 3, 2024

I reviewed too fast. For NGINX it's easier because it supports gzip/zopfli pre-compression natively and Brotli with a module. Just use the gzip_static (and brotli_static if Google's Brotli module is available).

@derickr
Copy link
Member

derickr commented Dec 4, 2024

On php/web-php#1097 you write "IMO we should get rid of cached.php and leave assets compression and cache management to nginx (or caddy).". I don't want to do that just now, and would prefer if everything was web server agnostic. We're thinking of moving everything to either apache or nginx (rather Apache, I think).

A PR with a new script to build a new WASM file can just be a new file in this repository.

@soyuka
Copy link
Author

soyuka commented Dec 5, 2024

I discussed this with @dunglas basically I'll add a gzip static compression and enable gzip_static, not sure what value we would like for gzip_proxied (https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_proxied) though.

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

Successfully merging this pull request may close these issues.

3 participants