Compress components with gzip - Java EE

前端 未结 5 399
遇见更好的自我
遇见更好的自我 2021-01-21 18:39

I am looking to improve front-end performance of my application, so I used YSlow tool in Firefox. When I ran this tool for my app, in the YSlow grade tab it showed up a issue \'

5条回答
  •  滥情空心
    2021-01-21 18:54

    I recommend to use a Servlet Filter (since servlet 2.3 spec)

    A gzip filter is well documented, so there is no need to reinvent the wheel:

    • http://raibledesigns.com/rd/entry/the_battle_of_the_gzip
    • http://onjava.com/pub/a/onjava/2003/11/19/filters.html

    Also, some servlet containers can do gzip on the fly. Take a look at this related question.

提交回复
热议问题