Cross domain access now, and support for the future
Date : 2008 08 01 Category : Tech & DevelopmentKris Zyp is really leading the charge on various missions such as JSON-* and XHR-*. This time he has a posting on a new cross-site XHR plugin repository that wraps up the myriad of techniques that are both pending in standards (XDomain, XHR++) and work arounds (window.name, magic iframe hackery). It also falls back to the faithful "just put up a proxy" for those poor browsers that can't handle the ninja.
PLAIN TEXT JAVASCRIPT: // Access-Control: allow <*> for XHR dojox.io.xhrPlugins.addCrossSiteXhr("http://othersite.com/"); dojo.xhrGet({url:"http://othersite.com/data"}) // window.name dojo.require("dojox.io.xhrWindowNamePlugin"); dojox.io.xhrWindowNamePlugin("http://othersite.com/"); // proxy for the other folk dojox.io.xhrPlugins.addProxy("/proxy?url=");Fantastic work as usual.