nginx configures gzip to compress css but not compress js
大家讲道理
大家讲道理 2017-05-16 17:27:04
0
1
419

The nginx I use is 1.6. gzip is written in the configuration file. See below

gzip on;
gzip_min_length 1k;
gzip_buffers 16 64k;
gzip_http_version 1.1;
gzip_comp_level 9;
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;   

But I used the online testing tool http://gtmetrix.com/ to test. Only the css was compressed and the js was not compressed (the same is true for the domestic webkaka speed test). How strange.
I asked many people, but no one knows. Could it be due to my configuration? Thanks!

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!