Is there a way to compress all JSF Ajax requests?
有没有办法压缩所有JSF Ajax请求?
1 个解决方案
#1
3
Yes, just turn on GZIP compression at servletcontainer level. How exactly to do that depends on the container used. In case of for example Tomcat you can do that by adding compression="on"
to the HTTP <Connector>
of interest in /conf/server.xml
. You also need to ensure that text/xml
is one of the default mime types in the compressableMimeType
setting.
是的,只需在servletcontainer级别打开GZIP压缩。究竟如何做取决于使用的容器。在例如Tomcat的情况下,您可以通过将compression =“on”添加到/conf/server.xml中感兴趣的HTTP
#1
3
Yes, just turn on GZIP compression at servletcontainer level. How exactly to do that depends on the container used. In case of for example Tomcat you can do that by adding compression="on"
to the HTTP <Connector>
of interest in /conf/server.xml
. You also need to ensure that text/xml
is one of the default mime types in the compressableMimeType
setting.
是的,只需在servletcontainer级别打开GZIP压缩。究竟如何做取决于使用的容器。在例如Tomcat的情况下,您可以通过将compression =“on”添加到/conf/server.xml中感兴趣的HTTP