Tomcat Compression Does Not Add a Content-Encoding: gzip in the Header

后端 未结 5 1173
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 11:05

I am using Tomcat to compress my HTML content like this:



        
5条回答
  •  隐瞒了意图╮
    2020-12-13 11:46

    I had a look at the Tomcat documentation here: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

    It mentions using compression="force" which worked for me. It also says you can set a minimum number. This worked fine for me

    
    

    (compress anything over 256Kb)

    The default value for compressableMimeType meant that I didn't need that attribute. Also note that it doesn't list CompressionMinSize attribute.

提交回复
热议问题