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

gzip assets and wasm #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

gzip assets and wasm #67

wants to merge 4 commits into from

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

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

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.

php-web4/nginx/nginx.conf Outdated Show resolved Hide resolved
php-web4/nginx/nginx.conf Outdated Show resolved Hide resolved
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