I have enabled compression on Tomcat running on my machine. The https response header is showing compression is enabled, but the same amount of data is being transferred with and without compression turned on.
Without compression:
Status OK
Code 200
Encoded 218.89 KB
Decoded 218.89 KB
Transfered 219.22 KB
Compressed No
With compression:
Status OK
Code 200
Encoded 218.89 KB
Decoded 218.89 KB
Transfered 219.26 KB
Compressed Yes
Compression 1.00×
I can see Content-Encoding as gzip in response header.
My connector definition in server.xml follows:
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="xxxxx" keystorePass="xxxx"
useSendfile="false" compression="force" />
I am using Tomcat 8.0.12. Browsers are latest versions of Safari running on MAC OS X Yosemite.
Detailed info with compression ON
Detailed info with compression OFF
Edit: As per Tim's answer, I was misled by the Safari reporting numbers. See stackoverflow.com/a/21943693/3944823.