Issue in gzip compression

余生长醉 提交于 2020-01-24 13:03:29

问题


I am using gzip to compress the loading files. For that i have written the following code in server.xml in tomcat.

<Connector 
compressableMimeType="text/html,text/xml,text/json,text/javascript,text/css,text/plain,application/json,application/javascript"
compression="on"
compressionMinSize="2048"
connectionTimeout="200000"
noCompressionUserAgents="gozilla, traviata"
port="8080"
protocol="HTTP/1.1"
redirectPort="8443"/>

What i get is "Content-Encoding : gzip". But for some files it is not get compressed.I cant get where the problem is. Please some one help me to solve this issue.


回答1:


I changed the value of compression to "force".It works.

For reference



来源:https://stackoverflow.com/questions/23776872/issue-in-gzip-compression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!