Integrate gzip with GWT

五迷三道 提交于 2019-12-24 05:59:19

问题


I want to use gzip with GWT

Please suggest how do i compress my GWT nocache.js,cache.html and gwt.rpc files using gzip

Please help me

Thanks


回答1:


Generally, gzip is enabled on the server that your files are being hosted on, and you can do it for all files on your site rather than just those 3.

This site helps you test whether gzip is enabled on your site: http://www.whatsmyip.org/http_compression/

Here's how to turn gzip on with the Apache web server: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html




回答2:


If you're using GWT 2.1 add <inherits name="com.google.gwt.precompress.Precompress"/> to your <Module>.gwt.xml file - GWT will then prescompress (using gzip) all static resources.

Jetty (6&7) will automatically serve the gzipped version if available...

GWT's RPCServlet checks if the client can handle gzipped content if it can it will be gzipped on the fly.



来源:https://stackoverflow.com/questions/5114980/integrate-gzip-with-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!