title: Enabling GZIP is GWT application
body: <p>I'm working on pay load optimization.</p>
  
  <p>Here I read that <a href="http://developer.yahoo.com/performance/rules.html#gzip" rel="nofollow noreferrer">compress your responses in to GZIP</a>,</p>
  
  <p>So I <a href="https://code.google.com/p/webutilities/wiki/CompressionFilter#About_these_patterns" rel="nofollow noreferrer">Configuring the CompressionFilter</a></p>
  
  <p>And configured the below filter to compress my responses to gzip,</p>
  
  <pre><code>&lt;filter&gt;  
      &lt;filter-name&gt;compressionFilter&lt;/filter-name&gt;  
      &lt;filter-class&gt;com.googlecode.webutilities.filters.CompressionFilter&lt;/filter-class&gt;  
      &lt;init-param&gt;   
         &lt;param-name&gt;compressionThreshold&lt;/param-name&gt;  
         &lt;param-value&gt;1024&lt;/param-value&gt;  
      &lt;/init-param&gt;  
      &lt;init-param&gt;   
         &lt;param-name&gt;ignoreMimes&lt;/param-name&gt;  
         &lt;param-value&gt;images/*,video/*, multipart/x-gzip&lt;/param-value&gt;
      &lt;/init-param&gt;  
  
   &lt;/filter&gt;  
   &lt;filter-mapping&gt;  
      &lt;filter-name&gt;compressionFilter&lt;/filter-name&gt;  
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;  
   &lt;/filter-mapping&gt;  
  </code></pre>
  
  <p>It's working fine for not files like js,html,css.. etc.. but  where as for the Ajax response I'm unable to make it work.</p>
  
  <p>I'm using GWT RPC calls which by default a gzip response, My assumption is that it is trying to gzip again which is already a gzip response and giving me the exception.</p>
  
  <p>StackOverFlow not allowing to paste the StackTrace even. So adding an image.</p>
  
  <p><img src="https://i.stack.imgur.com/PIlkH.png" alt="enter image description here"></p>
  
  <p>Any help in this ? Anything i'm missing ?</p>