Create an Account
username: password:
 
  MemeStreams Logo

IE8 XDomainRequest

search

Acidus
Picture of Acidus
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Acidus's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
IE8 XDomainRequest
Topic: Miscellaneous 10:55 pm EST, Mar  5, 2008

While enumerating through all the properties of the window object in IE8, I noticed a couple things. The first was sessionStorage and globalStorage, so IE8 is supporting DOMStorage just like Firefox 2. This is nice, because userData was a pain in the ass to use (though interestingly, fairly secure with its default permissions)

I'm still trying to figure out their XDomainRequest. Basically you have code like this:

var xdr = new XDomainRequest(); 

xdr.open("GET", "http://www.memestreams.net/");
xdr.send();

Instead of XHR's onreadystatechange XDR uses onload and onprogress. The problem is I can't find a working example (As of 10:44pm there are 7 pages on Google to even mention this object.

I have confirmed the XDR send out HTTP requests with the header XDomainRequest: 1 and does not send any Cookies. Presumably the website has to respond with a special HTTP header that tells IE8 its ok to bubble the response to JavaScript. Otherwise you could use XDR to fetch contain from any site, though the lack of cookies reduces the chance of this containing sensitive data. In the above example the onprogress or onload events will not fire when I try to send a GET to www.memestreams.net from msblabs.org, most likely because memestreams isn't returning the appropriate HTTP header. Too bad, even without cookies that would have made for an excellent rewrite of Jikto.

I don't now what the web server needs to response to. But here is a summary of what I do know:

-XDR does not send cookies. Perhaps once the website has "agreed" with IE8 to return content to JavaScript then XDR will send cookies, but I don't know.
-XDR includes the HTTP header XDomainRequest: 1 on its HTTP requests
-XDR, like XHR, transparently follows redirects. HTTP request to the redirected resource still include the XDomainRequest: 1 header

An XDR has the following properties/functions:
-onerror
-timeout
-ontimeout
-onprogress
-responseText
-onload



 
 
Powered By Industrial Memetics
RSS2.0