as per https://tomcat.apache.org/tomcat-7.0-doc/config/http.html I put compression="10" into the server.xml, but https://developers.google.com/speed/pagespeed claims gzip is not yet activated. I have also tried compression="on" compressionMinSize="512" with the same result. See https://p4u.ch/page_speed_rh
It is not APR as discussed in http://marc.info/?l=tomcat-user&m=139280091513414&w=2
Hi, By default mime types that will be compressed are text/html,text/xml,text/plain. compressableMimeType The value is a comma separated list of MIME types for which HTTP compression may be used. The default value is text/html,text/xml,text/plain. Are you requesting resources with such mime types? Regards, Violeta
The google test lists a css as an example. We should probably add css and JavaScript files to the default list. To Ralf: Does ist work for the mime types cited by Violeta? You can change the list with the attribute "compressableMimeType", which is a comma separated list, default value "text/html,text/xml,text/plain".
Thanks Rainer, this made google happy. title was: "compression" in server.xml not considered sufficient by google" ==> I suggest to add text/css do the default of compressableMimeType ----> changed to enhancement
Don't forget that the availability of sendFile trumps any compression configuration.
Thanks for the report. This has been fixed in trunk (for 9.0.x), tc8.0.x/trunk for 8.0.22 onwards and tc7.0.x/trunk for 7.0.62 onwards.
I agree with Rainer that JavaScript should be whitelisted as well. @Mark: do you see problem by adding text/javascript and application/javascript to the list?
+1 for javascript as well
+1 for javascript