Menu

#39 Enable gzip compression for served content like application/json

open
nobody
None
1
2014-05-25
2014-05-25
Anonymous
No

To speed up transfer times the html, javascript, css and json responses should be send compressed by the subsonic server. Enabling jetty compression reduced the content to transfer for some rest calls from 400kb to 30kb.

I added the following to the web.xml

<filter>
<filter-name>GzipFilter</filter-name>
<filter-class>org.mortbay.servlet.GzipFilter</filter-class>
<init-param>
    <param-name>mimeTypes</param-name>
    <param-value>text/plain,text/javascript,text/html,text/css,text/xml,text/csv,application/json</param-value>
</init-param>
</filter>
<filter-mapping>
    <filter-name>GzipFilter</filter-name>
    <url-pattern>*</url-pattern>
</filter-mapping>

Discussion

Anonymous
Anonymous

Add attachments
Cancel