Create an Account
username: password:
 
  MemeStreams Logo

MemeStreams Discussion

search


This page contains all of the posts and discussion on MemeStreams referencing the following web page: IE8 XDomainRequest. You can find discussions on MemeStreams as you surf the web, even if you aren't a MemeStreams member, using the Threads Bookmarklet.

IE8 XDomainRequest
by Acidus at 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


 
RE: IE8 XDomainRequest
by Jordan at 10:00 am EST, Mar 6, 2008

Acidus wrote:
&ltp;SNIP>
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

Here's a Microsoft document detailing the new features (short answer: use a response header of XDomainRequestAllowed set to 1).


  
RE: IE8 XDomainRequest
by Acidus at 11:05 am EST, Mar 6, 2008

Jordan wrote:
Here's a Microsoft document detailing the new features (short answer: use a response header of XDomainRequestAllowed set to 1).

Excellent! Thanks Jordan


 
 
Powered By Industrial Memetics