I managed to enable gzip compression by modifying jetty/nnnn/webapp/WEB-INF/web.xml, adding :
- Code: Select all
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.mortbay.servlet.GzipFilter</filter-class>
<init-param>
<param-name>mimeTypes</param-name>
<param-value>text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>GzipFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
ytechie, to my opinion, removing whitespaces to reduce bandwidth usage will be a lot less efficient than enabling compression. Maybe you can try my solution and tell me how it works for you?
Sindre, perhaps could you include this filter into the war's web.xml, so compression will be enabled by default ? (and so I will not have to re-enable it everytime I upgrade Subsonic

)
And, just being curious, what was the modification you made to Subsonic when you added "Compress html pages with gzip." to 4.0 changelog ?