Did some more reading and trial and error and have it now working as
followed:

1) In Apache config file:
a):
<Directory "YOUR GWT DIR" >
 Options +MultiViews
 AddEncoding x-gzip .gz .tgz
</Directory>

b):
<FilesMatch "\..js.gz$">
  ForceType text/javascript
</FilesMatch>

2) Remove all original not-gzipped files such that content negotiation
occurs.

If you remove b) (which I would like) it doesn't work as the Content-
Type that the browser receives of a js.gz will be application/x-gzip
which is wrong as it must be text/javascript, otherwise it doesnt
work. Config snippet b) will force this.
I would suppose that b) isn't necessary and that Apache would discover
and set this them self... but it didn't...

So the question now: is this the way to do it??
My complain: I have to add b) snippets for every content type that is
gzipped: css, js, xml, html, etc.. That seem awkward...

Example of request and response headers:
-----
     Response Headersview source
Date    Thu, 23 Dec 2010 23:20:38 GMT
Server  Apache/2.2.6 (Win32)
Content-Location        login.nocache.js.gz
Vary    negotiate
TCN     choice
Last-Modified   Thu, 23 Dec 2010 20:35:17 GMT
Accept-Ranges   bytes
Content-Length  2339
Cache-Control   public, max-age=0, must-revalidate
Expires Thu, 23 Dec 2010 23:20:38 GMT
Content-Type    text/javascript
Content-Encoding        gzip


     Request Headersview source
Host    localhost
User-Agent      Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:
1.9.1.16) Gecko/20101130 Firefox/3.5.16
Accept  */*
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive      300
Connection      keep-alive
Referer http://localhost/bv-web/
If-Modified-Since       Thu, 23 Dec 2010 20:35:17 GMT
Cache-Control   max-age=0

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@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