Problem to configure gzip on static file with nginx



I’m try to configure gzip on my project with served by ngnix.
The pages are well compressed but the issue here is with static files (js) which are not compressed.

gzip on;
gzip_disable "msie6";

gzip_vary on;
gzip_proxied any;
# gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

Any help please.


Hi fisher,

The issue here is on gzip_types just add application/javascript and reload nginx (service nginx reload)