Monday, January 5, 2015

Re: GWT 2.7 manifest support

Thank so much for the detailed explanation, Jens. This issue was really critical for our project.
Now it works!

I use GWT 2.7. with gz. compression. My target browsers are mobile browsers: Google Chrome and (Mobile) Safari. They should handle the compression (gz). 

Also the html (and other files which should be updated dynamically) update works now because I changed the file name as you mentioned to *.nocache.html (gwt-cache-filter enabled). The only thing I had to do, was to remove the filter-tags in my web.xml  (as described above) to make it accessible to the whole application.

--
Marian

Am Sonntag, 4. Januar 2015 16:07:38 UTC+1 schrieb Jens:
1.) GWT 2.7. has a timestamp bug which causes the app.nocache.js file to have the same timestamp as the App.gwt.xml file.

=> upgrade GWT to latest trunk version (e.g. 2.8-SNAPSHOT from Maven) until 2.8 is released.

2.) You MUST make your HTTP headers right for files you want to cache and files that should always be checked if a new version is present on the server. The gwt-cache-filter project sets correct caching headers for anything that GWT generates, e.g. files that contain *.cache.* or *.nocache.* in their file name. All other files will have the default HTTP caching headers set by your server. I don't know what your server does by default, you have to check that yourself. 
If you want other files to have correct caching headers then you must configure your server to do so. Since you now use the gwt-cache-filter project you could also just rename other files to the same naming scheme that GWT uses and add *.cache.* or *.nocache.* to their file name (e.g. Infos_de.nocache.html)

3.) If you use the Precompress Linker and a filter that serves a *.gz file (if present) then you kind of work around problem 1.) since the Precompress Linker will create a new file (e.g. app.nocache.js.gz) with a fresh, up-to-date timestamp on every compile.



So you MUST fix 2.) otherwise your app will be broken anyways. Thats something every GWT app must configure properly. Once you fixed that you have the choice:

- Use GWT 2.7 and apply the Precompress Linker to workaround the timestamp bug in GWT 2.7. However older browsers that do not accept *.gz files will still see wrong app behavior. But such old browsers are probably not your target browsers anyways

- You upgrade to GWT 2.8-SNAPSHOT (GWT trunk build) to fix the timestamp issue. Then it does not matter if you use the Precompress Linker or not.



-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment