Configurate Tomcat 8 with GZIP

2019-07-24 18:26发布

I'm trying to set GZIP in Tomcat, I've shown a lot of examples but anyone works for me. Below you can see my server.xml configuration and an example of request:

server.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               useSendfile="false"
               compression="force" compressionMinSize="1024" noCompressionUserAgents="gozilla, traviata"
       compressableMimeType="text/html,text/xml,text/javascript,text/css,application/javascript"/>

request:

request with GZIP enabled

Thanks!

1条回答
Explosion°爆炸
2楼-- · 2019-07-24 19:08

I've found the answer, I've disabled my antivirus and compression works fine.

查看更多
登录 后发表回答