Welcome! Log In Create A New Profile

Advanced

RE: RE: Gzip not compressing

Reinis Rozitis
September 07, 2019 12:58PM
> I am trying to reduce transfer size in my website. Although i apparently have
> enabled Gzip compression, i does not show as enabled in GTmetrix testing.

For testing purposes just putting:

gzip on;
gzip_types text/html text/plain text/xml text/css application/javascript application/json;

in http {} block (and reloading nginx) should be enough to enable gzip (obviously add whatever other types you need like svg / fonts).

Other directives can be specified later for finetuning.


> i does not show as enabled in GTmetrix testing.

You should check which resources the testing tool expects to be compressed (maybe all of those come from external sites?).

Also not all of the recommendations are (very) important.
For example the testing tool for one of my site complains - manifest.json could save 92B (32% reduction). While the 32% percentage looks reasonable the actual gain of 92 bytes doesn't make much sense to compress the file on server side / decompress on client side.

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Gzip not compressing

Anand Arun September 07, 2019 09:30AM

RE: Gzip not compressing

Reinis Rozitis September 07, 2019 10:10AM

Re: RE: Gzip not compressing

arunkiji September 07, 2019 11:53AM

RE: RE: Gzip not compressing

Reinis Rozitis September 07, 2019 12:58PM

Re: RE: RE: Gzip not compressing

arunkiji September 07, 2019 04:20PM

Re: Gzip not compressing

arunkiji September 12, 2019 09:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready