Use gzip compression to reduce data transfer size and speed up Web page loading. Many large stations have been opened gzip compression, but there are many sites do not turn on gzip compression, the last read an article said to open gzip compression search engine unfriendly, but from the bandwidth and flow point of view, it is still necessary to turn on gzip compression.
For TOMCAT7 server, open the Server.xml file under the Conf folder and find
Copy Code code as follows:
<connector port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
redirectport= "8443"/>
Modified to:
Copy Code code as follows:
<connector port= "8080" protocol= "http/1.1"
connectiontimeout= "20000"
Redirectport= "8443"
Compression= "On"
Compressionminsize= "2048"
Nocompressionuseragents= "Gozilla,traviata"
Compressablemimetype= "text/html,text/xml,text/javascript,application/x-javascript,application/javascript,text/ Css,text/plain "/>
Save the exit and restart the Tomcat server. PS: You can use the following Web site to determine whether gzip open:
http://www.gidnetwork.com/tools/gzip-test.php