NGINX gzip not compressing JavaScript files

Change this line:

gzip_types    text/plain application/x-javascript text/xml text/css;

To be this:

gzip_types    text/plain application/javascript application/x-javascript text/javascript text/xml text/css;

Note the addition of application/javascript and text/javascript to your list of gzip types.

There are also more details—and a more expansive list of gzip types—in the answer posted here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)