0

I am using Omnifaces 1.7/primefaces 5.2 /jsf 2.0/J2ee 5/weblogic 10.3/IE 11.

I have set up GzipResponseFilter to enable compression for my webapp. Inspite of adding the below configuration, i dont see any difference in response size recieved in the browser. I am using IE11 and its debugger tool to check the response size. I also see that Accept-Encoding - gzip,deflat - passed in the request header from IE11. Can any one help me on knowing why i dont see the compression working. Below is the web.xml ?

<filter>
    <filter-name>gzipResponseFilter</filter-name>
    <filter-class>org.omnifaces.filter.GzipResponseFilter</filter-class>
    <init-param>
        <param-name>threshold</param-name>
        <param-value>150</param-value> <!-- size larger than 150 should be compressed -->
    </init-param>
    <init-param>
        <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>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>
ZEE
  • 381
  • 1
  • 6
  • 20
  • What do you see in the response encoding? Might be that it just shows the uncompressed size. – Kukeltje May 11 '15 at 07:05
  • In the response header from IE Debugger, the only relevant to encoding i see is below. Transfer-Encoding chunked – ZEE May 11 '15 at 10:05
  • Patience is a virtue. If things are urgent, get commercial support somewhere – Kukeltje May 12 '15 at 05:13
  • I guess looking for compressed response size in IE Debugger is wrong. IE shows the response size after uncompressing. I should use fiddler to check the response size. Once i check fiddler, will update the post. – ZEE May 14 '15 at 05:17

1 Answers1

0

Try using different URL pattern

<filter-mapping>
    <filter-name>gzipResponseFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>

Refer to following link for more details of how i do this https://stackoverflow.com/a/35567295/5076414

Community
  • 1
  • 1
Sacky San
  • 1,535
  • 21
  • 26