NGINX setup for .unityweb

Hi!

I’ve googled a lot, but still can’t resolve “You can reduce your startup time if you configure your web server to host .unityweb files using gzip compression.” message.

Here my simple localhost config (as screenshot and as txt for upload purposes) and a screenshot from Chrome web inspector. Looks like encoding is working…

Thank you in advance!

4739459–449492–nginx.txt (785 Bytes)

my config is like this

location ~ .+\.unityweb$ {
add_header Content-Encoding gzip;
}

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;

I also noticed… if I use gzip the loaded datasize is bigger. Its 18299793 and without gzip
10529631. So actually for me faster to deeactivate it.
But still I turned on. I alos noticed with gzip I do not get total size but without I do get it.

Thank you for the answer. Unfortunately, my files are much bigger without gzip. The first time I’ve tried your config I got the same error message, however it’s gone now. I’ll test it with different browsers and devices. Thank you :slight_smile: