Remember to use compression, at least by using GWT Precompress module to sh


If you are not using gzip to compress you widgetset artefacts,

you should

. In someway or another. There are multiple ways how this can be achieved like:

These are the options you should use most often. And the very little you might lose in CPU cycles, you’ll win back as your threads are released to serving new requests faster. These “dynamic” compression mechanisms excel as they work for both “widgetset responses” and actual client-server communication.

From those the former is often more important. Doing it significantly reduces startup time, espicially on mobile devices. In Serving the compressed widgetset can also be achieved by “precompressing” widgetset artefacts and serving them instead. This can be slightly more efficient as gzippin happens only once and one can thus use stronger, more cpu intensive settings. Also if for some weird reason you can’t setup any of the above, you could use this as a “workaround”.

GWT has a built in linker that can do the gzipping during GWT compilation. Jetty is the only server that I know can automatically serve the precompressed versions (when non compressed are requested), but many web servers can be configured to do the same pretty easily. Too bad most simple Vaadin hosting setups serve static files via VaadinServlet and thus this don’t work out of the box, even with Jetty. Luckly one can quite easily customize servlet to serve pre compressed files, on any servlet containers.

Check out
this changeset
to see the servlet customizations and usage of PreCompress GWT module.

On this topic, Marc’s some years old
might also be helpfull.


Hello Matti,

I have question, on broswers like ie8/ie9 for that matter any of the browsers that dont support WebSockets, we have a fallback option to http streaming when the application uses PUSH mechanism. If we enable Gzip on such applications Vaadin Push doens’t seem to work. Can you please confirm this.

Architecture at high level -

App server: Jboss 7.x
Compression Mech - GZip
Vaadin Version - 7.1.x
Browsers Checked - ie8 & ie9
Client OS - Windows 7
Server OS - Windows 7/ Ubuntu Linux 14.04

Please let me know in case you need any addional information.


Hi, unfortunately HTTP streaming is usually incompatible with compression due to the need to buffer the response to compress or decompress it. In Vaadin 7.2 you can use long polling instead of streaming which should also work fine with compression.

You can probably configure your server to selectively enable compression for URIs other than /PUSH/.

Hello Johannes,

We have used Polling for now. But will move to Push once we stop supporting Brwosers that don’t support Web Sockets.