| 主题:GzipFilter requires Resin Professional |
|---|
|
resin-web.xml xhtml代码
init directives
If <allow-content-type> is specified, any unmatched content-type will not be compressed. |
||||||||||||||||||
![]() ★★★★★★★★ 纵里寻她千百度,蓦然回首,那人却在,灯火阑珊处! MyBlog :http://blog.javawind.net |
|||||||||||||||||||
|
|
Resin服务器的做法如下:
Resin 3.0.x <web-app xmlns="http://caucho.com/ns/resin"> <filter filter-name="gzip" filter-class="com.caucho.filters.GzipFilter"/> <filter-mapping url-pattern="/*" filter-name="gzip"/> </web-app> Resin 2.x <web-app xmlns="http://caucho.com/ns/resin"> <filter filter-name="gzip" filter-class="com.caucho.http.filter.GzipFilter"/> <filter-mapping url-pattern="/*" filter-name="gzip"/> </web-app> 二者的差别只是GzipFilter所在的包不同而已!其他的应用服务器如果不支持压缩的话你也可以自己写GzipFilter来处理,可以参考resin的源码进行编写。 |
![]() ★★★★★★★★ 纵里寻她千百度,蓦然回首,那人却在,灯火阑珊处! MyBlog :http://blog.javawind.net |
|
|
|
GZip是“GNU Zip”的缩写,是由Jean-loup Gailly开发的压缩方式。
顾名思义,“GZip加速”就是在页面由服务器传送向客户端之前先用GZip压缩,然后到客户端再进行解压操作,由于传输数据量大大减小,下载速度当然有所提高咯。不过目前宽带已经普及,这种技术并不会带来明显的速度提升(当然这一切都是我们所感觉不到的)。 |
![]() ★★★★★★★★ 纵里寻她千百度,蓦然回首,那人却在,灯火阑珊处! MyBlog :http://blog.javawind.net |
|
|
粤ICP备07511478号