1. 程式人生 > >Tomcat8中開啟gzip壓縮功能的配置方法

Tomcat8中開啟gzip壓縮功能的配置方法


<Connector port="8080" protocol="HTTP/1.1"
                    connectionTimeout="20000"
                    redirectPort="8443"
                    compression="on"
                    compressionMinSize="50"
                    noCompressionUserAgents="gozilla,traviata"
                    compressableMimeType="text/html,text/xml,text/javascript,application/x-javascript,application/javascript,text/css,text/plain"/>