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