gzip压缩中的问题 [英] Issue in gzip compression

查看:141
本文介绍了gzip压缩中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用gzip压缩加载文件。因为我已经在tomcat的server.xml中编写了以下代码。

 < Connector compressableMimeType =text / html,text / xml,text / json,text / javascript,text / css,text / plain,application / json,application / javascriptcompression =oncompressionMinSize =2048connectionTimeout =200000noCompressionUserAgents =gozilla,traviataport =8080protocol =HTTP / 1.1redirectPort =8443/> 

我得到的是Content-Encoding:gzip。但对于一些文件,它不会被压缩。我不能得到问题的地方。请帮我解决这个问题。

解决方案

我将压缩的值改为force。 / p>

参考


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.

解决方案

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

For reference

这篇关于gzip压缩中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆