nginx开启gzip的配置和校验

    gzip on;  开启压缩
    gzip_min_length 1k;   设置压缩最小单位,小于不压缩
    #gzip_disable "msie6";
    # gzip_vary on;
    # gzip_proxied any;
    gzip_comp_level 4;  压缩比
    gzip_buffers 4 16k;  
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;  压缩内容

发表评论