3 ms·
If you control the deploying process and the web server (at least with Nginx), you can disable gzip for the small files (like the article has), and avoid on-the
by idoubtit 3y ago
If you control the deploying process and the web server (at least with Nginx), you can disable gzip for the small files (like the article has), and avoid on-the-fly compressing for the larger files.
location /js/small {
gzip off;
}
location /js/ {
gzip on;
# Use the .gz file if it exists
gzip_static on;
}
- palsecam 3y agoNB: there is also nginx `gzip_min_length` directive to avoid compressing small files https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzip_min_length https://nginx.org/en/docs/http/ngx_http_gzip_module.html#gzi...