It's definitely possible to serve GWT static assets from a CDN, see comments from an earlier discussion:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/92ec90538cb4453a/a4dfe85c81c2e8ce?q=#a4dfe85c81c2e8ce I've not tried the JS technique you describe nor have I used the proxying technique described by Sri. I just used a subdomain for my static assets which is served from the CDN. Then I served the webpage that hosts the GWT app from the same place serving RPC to satisfy Same Origin Policy (SOP). Good luck, C. On Nov 18, 4:50 am, Dobes <[email protected]> wrote: > I'm looking to improve load times for our application (and our site) > and I think a CDN (like SimpleCDN or something) could be really > helpful. For example, serve the js code from cdn.mydomain.com and run > the RPC servlet from api.mydomain.com. > > Has anyone tried using a CDN with GWT modules? > > I've heard that in javascript you can do something like > document.domain = 'mydomain.com' and this would allow you to treat all > subdomains of mydomain.com as the same domain with respect to the same- > origin-policy. Would I be able to run document.domain='mydomain.com' > in my onModuleLoad() using JSNI and gain the ability to access an RPC > servlet at api.mydomain.com if the GWT code was served from > cdn.mydomain.com ? > > Based on what I read in Issue 214 > (http://code.google.com/p/google-web-toolkit/issues/detail?id=214 > ) the cross-site linker should also make this possible by using js > files instead of an html iframe, so the js operates in the same domain > as the host page instead of the domain of the *.cache.html file. > However, the continued existence of the "std" linker seems to imply > that there must be some drawback to using the cross-site linker. Any > ideas what that disavantages of the cross-site linker might be? > > Thanks, > Dobes -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.
