2008-05-20
开启TOMCAT6的GZIP压缩
关键字: tomcat gzip
修改 $CATALINA_HOME/conf/server.xml
找到:
与压缩相关的设置说明:
修改后的server.xml
找到:
<Connector port="8080" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000" redirectPort="8443" />
与压缩相关的设置说明:
compression : The Connector can use HTTP/1.1 GZIP compression to get better bandwidth
from the server. This can be enabled via the compression attribute. The valid values are off (disables compression), on (enables compression), force (forces compression in all cases), or a numerical value that specifies the minimum amount of data required before the output is compressed.The default value of the compression attribute is off .
compressibleMimeTypes : This is a comma-separated list of MIME types for which HTTP compressions (see the next attribute) can be used. The default value is text/html,text/xml,text/plain .
noCompressionUserAgents : This is a comma-separated list that matches the HTTP UserAgent value of Web browsers that have a broken support for HTTP/1.1 compression. Regular expressions can be used here.
修改后的server.xml
<Connector port="8080" protocol="HTTP/1.1" maxThreads="150"
compression="on"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain,application/json"
connectionTimeout="20000"
redirectPort="8443" />
发表评论
- 浏览: 16895 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
我的相册
memcached
共 3 张
共 3 张
最近加入圈子
最新评论
-
试用Google Chrome浏览器
很好,支持开源,我正在使用!
-- by wenjixiao -
pidgin的飞信插件
附件里的x86_64版本的,你的ubuntu是x86_64的吗?
-- by lveyo -
Spring2结合DWR2的用户注 ...
你的例子,运行起来,UserAjaxHelper.checkUsername(u ...
-- by huanglppp -
pidgin的飞信插件
奇怪,我的就不行呢,我的版本也是pidgin 2.4.3,ubuntu 8.04 ...
-- by eBug -
pidgin的飞信插件
Pidgin 2.4.3插件的名字叫 fetion
-- by lveyo






评论排行榜