Enable Tomcat gzip compression with compression=on
February 21, 2012 20:54:23 Last update: February 21, 2012 20:57:57
Tomcat gzip compression filter can be turned on with "
The default compressed MIME types are:
It would be nice to add other types:
compression=on" in server.xml:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" compression="on" redirectPort="8443" />
The default compressed MIME types are:
text/html,text/xml,text/plain.
It would be nice to add other types:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" compression="on" compressableMimeType="text/html,text/xml,text/plain,application/xml,application/json,text/css,application/javascript" />