开发者

Integrate gzip with GWT

开发者 https://www.devze.com 2023-02-13 03:53 出处:网络
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开发者_如何学Go

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开发者_如何学Go

Please help me

Thanks


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号