Compress components with gzip - Java EE

前端 未结 5 458
遇见更好的自我
遇见更好的自我 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条回答
  •  Happy的楠姐
    2021-01-21 19:05

    You normally configure it at appserver/servletcontainer level. I don't know which one you're using, so here's just a Tomcat targeted example. In the /conf/server.xml configure the component as follows:

    
    

    That's all. Just add compression="on". The other servers provides a comparable setting. consult its documentation for details. Often it's exactly the same because they're built on top of Tomcat.

    For more YSlow hints in Java EE webapplication perspective you may find this blog article more useful.

提交回复
热议问题