1. 程式人生 > >Tomcat 9 開啟gzip壓縮

Tomcat 9 開啟gzip壓縮

compressableMimeType="text/html,text/plain,text/xml,application/javascript,text/css,text/plain,application/json"
noCompressionUserAgents="gozilla, traviata"
compressionMinSize="2048"
compression="on"
useSendfile="false"
server.xml相應的Connector中加入以上內容即可,不推薦開啟圖片壓縮