docker-magento2-nginx
docker-magento2-nginx copied to clipboard
gzip is commented out
it's off by default. if we enable, i want to make sure it's setup correctly. any suggestions?
Here is the gzip setting I have tested.
I am not 100% sure it is the right gzip setting, but it does reduce the total page size from 4.x MB to 1.x MB once it is on.
BTW, I used https://gtmetrix.com to check the total page size.
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
........
gzip on;
gzip_types text/plain text/html text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/rss+xml image/svg+xml;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
gzip_buffers 16 8k;
gzip_comp_level 2;
gzip_disable "MSIE [1-6].(?!.*SV1)";
gzip_vary on;
include /etc/nginx/conf.d/*.conf;
}
thank you very much, that gives me something to go on. i don't think there is any reason to not enable it, correct?
Basically, every browser nowadays supports gzip. It shouldn't be any problem if you turn it on. Just need to find the perfect settings for Magento.