The general solution is to setup your Tomcat behind an Apache server. *
mod_headers* works well on just Apache, so you can use a filter there with *
mod_headers* to add the gzip headers. This way the browser knows that this 
js file is gz encoded.

A tip, I noticed if I just name files like script.js.gz, some firewalls 
tried to convert them to gzip MIME from JS (because they saw the .gz), 
breaking the app. So, I just made up my own ending and called it .jsz. Now 
I can easily just *.jsz to applied mod_headers too.

You can also create your own filter and do this all in Tomcat (like this 
example <http://stackoverflow.com/questions/2876250/tomcat-cache-control>), 
but remember this adds overhead and complexity, so why not just let Apache 
do it for you?


Sincerely,
Joseph

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/IWW2IfJkY1sJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to