Failed to load resource: xxx.cache.js

474 views
Skip to first unread message

Erik Koleszar

unread,
Jul 5, 2016, 11:50:42 AM7/5/16
to GWT Users
/Hi! I have upgraded to GWT 2.7 and after compiling a module and deploying it to Tomcat (in Eclipse Neon w Google Plugin v3.9.2), the browser just shows a blank page. And the Console goes:

C266D1B0DFB2D9284591DE5B07B0FF9A.cache.js Failed to load resource: the server responded with a status of 404 (No Encontrado)

It didn't happen in previous version (GWT 2.6).

Any help is appreciated!

Jens

unread,
Jul 5, 2016, 11:58:18 AM7/5/16
to GWT Users
Most likely a caching problem in your browser (your <modulename>.nocache.js file is probably cached by the browser and asks for an old permutation). *.cache.* and *.nocache.* must have correct HTTP caching headers.


-- J.

Michael Joyner

unread,
Jul 5, 2016, 12:00:29 PM7/5/16
to google-we...@googlegroups.com
There is a bug in GWT 2.7 for the no cache file having the wrong timestamp and being cached when it shouldn't as a result.


We haven't seen this bug when using GWT 2.8-beta1.

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

Thomas Broyer

unread,
Jul 5, 2016, 12:09:58 PM7/5/16
to GWT Users
On top of that, GWT 2.7 explicitly sets a "modified time" on the nocache.js that doesn't actually reflects neither the time you compiled the project nor the latest modified time of the files used for the compilation (it sets it to the modified time of the gwt.xml file).
If you package your app as-is in a WAR, it's possible that your server will send the modified time as a Last-Modified response header and honor If-Modified-Since; and if the modified time happens to be earlier than or equal to that of your previous nocache.js, then the browser will use its (actually stale) cached version. Using ETag/If-Match instead of (or in addition to) Last-Modified/If-Modified-Since would mitigate the problem.
Otherwise, make sure your nocache.js modified time actually is "OK".
Note: the change has been reverted in 2.8, and the net.ltgt.gwt.maven:gwt-maven-plugin has a workaround for it.
Reply all
Reply to author
Forward
0 new messages