How to enable gzip compression?
Posted: Tue Dec 16, 2014 2:20 pm
I would like to know how to enable gzip compression for static files (js, css, html and images) in broadleaf. I have tried the following in web.xml file of site module.
But still no use. Is there any order on where do I have to paste? Or did I miss doing something?
Thank you.
Code: Select all
<filter>
<filter-name>GzipFilter</filter-name>
<filter-class> org.eclipse.jetty.servlets.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>
But still no use. Is there any order on where do I have to paste? Or did I miss doing something?
Thank you.