Re: GWT not loading .js
Jens, it that code public for always inlining?
No as it contains some app specific code. But its really easy to implement.
Create index.tpl that contains the index.html code (host page). Instead of <script src="..app.nocache.js"/> you put a replacement tag in the file like $GWT_BOOTSTRAP_JS$. Then change your build script to include index.tpl and app.nocache.js for server deployment so that a server servlet can open both and read their content. Finally you replace the replacement tag with the app.nocache.js content and store the result in a static field for caching. Now you can write out the result to the browser.
We do this replacement strategy for inlining the GWT nocache.js file and for embedding JSON data like app version, user information, acls, etc.. The app reads that data directly from the host page and you don't have to do additional requests for fetching these data.
Whats important is that once you do inlining the app.nocache.js file, the HTTP response containing the generated index.html must have no-cache HTTP headers set.
-- 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/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home