Integrate gzip with GWT

2019-07-16 11:47发布

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

2条回答
家丑人穷心不美
2楼-- · 2019-07-16 12:22

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

查看更多
Animai°情兽
3楼-- · 2019-07-16 12:27

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.

查看更多
登录 后发表回答