我刨使用哪种传输大量的跨network.I数据对我的应用程序omnifaces已经omnifaces配置web.xml文件提及展示如下gzip的设置与omnifaces
<filter>
<filter-name>gzipResponseFilter</filter-name>
<filter-class>org.omnifaces.filter.GzipResponseFilter</filter-class>
<init-param>
<description>
The threshold size in bytes. Must be a number between 0 and 9999. Defaults to 500.
</description>
<param-name>threshold</param-name>
<param-value>500</param-value>
</init-param>
<init-param>
<description>
The mimetypes which needs to be compressed. Must be a commaseparated string. Defaults to the below values.
</description>
<param-name>mimetypes</param-name>
<param-value>
text/plain, text/html, text/xml, text/css, text/javascript, text/csv, text/rtf,
application/xml, application/xhtml+xml, application/javascript, application/json
</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>gzipResponseFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
荫使用卷曲测试大小,但我没有注意到任何显着的差异。 没有gzip的配置
curl http://localhost:8080/omnifaces-test/ > t
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1666 100 1666 0 0 126k 0 --:--:-- --:--:-- --:--:-- 147k
用gzip配置
curl http://localhost:8080/omnifaces-test/ > t
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1666 100 1666 0 0 283k 0 --:--:-- --:--:-- --:--:-- 406k
你能告诉我为什么我不是上面两个命令得到什么区别?
你的问题是什么? – 2012-07-30 06:22:12
@LuiggiMendoza:为什么在启用'GzipResponseFilter'后他没有看到卷曲响应有任何不同。 – BalusC 2012-07-30 11:29:00
@LuiggiMendoza你没有注意到我的问题:) – Suraj 2012-07-30 16:45:18