Gzip compression in Apache Tomcat 8 for image and font

Viewed 2669

This is configuration for gzip compression in Apache Tomcat 8

<Connector port="7070" maxHttpHeaderSize="8192"
       maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
       enableLookups="false" redirectPort="8443" acceptCount="100"
       connectionTimeout="20000" disableUploadTimeout="true" 
       compression="on" 
       compressionMinSize="256" 
       noCompressionUserAgents="gozilla, traviata" 
       compressableMimeType="text/html,text/xml,text/plain,text/css,application/javascript,font/otf,font/woff,
       font/woff2,image/gif,image/jpg,image/png"/>

png image is OK. It does not work for jpg image and woff2 font as below.

I already try as below, it does not work

image/jpg <or> image/jpeg <or> application/octet-stream

font/woff <or> font/woff2 <or> application/font-woff <or> application/font-woff2

Testing From Chrome

enter image description here

1 Answers
Related