{"id":344,"date":"2009-04-11T10:47:41","date_gmt":"2009-04-11T15:47:41","guid":{"rendered":"http:\/\/eligrey.com\/?p=344"},"modified":"2009-04-11T10:47:41","modified_gmt":"2009-04-11T15:47:41","slug":"why-you-shouldnt-use-xdomainrequest","status":"publish","type":"post","link":"https:\/\/eligrey.com\/blog\/why-you-shouldnt-use-xdomainrequest\/","title":{"rendered":"Why you shouldn&#8217;t use XDomainRequest"},"content":{"rendered":"<p>I just recently installed Windows and downloaded IE8 again and it seems that pmxdr works fine with the exception of one small <code>MessageEvent.source<\/code> bug in the host library that I fixed in version 0.0.5.<\/p>\n<p>I went to check out if the <a href=\"http:\/\/github.com\/eligrey\/pmxdr#readme\">XDomainRequest examples<\/a> I created worked, and to my astonisment, they <em>ALL<\/em> failed except for the simplest example. It turns out, contrary to what I assumed of it only not supporting responseXML, XDomainRequest also doesn&#8217;t support much of the basic HTTP header functionality offered in <a href=\"http:\/\/en.wikipedia.org\/wiki\/XMLHttpRequest\">XMLHttpRequest<\/a>, such as <code>setRequestHeader<\/code>, <code>getResponseHeader<\/code>, and <code>getAllResponseHeaders<\/code>. This means that my implementation of XDomainRequest actually offered more functionality than IE8&#8217;s implementation.<\/p>\n<p>Due to this, I have changed the XXDomainRequest library to implement a generic <code>XDR<\/code> constructor and I have renamed the library from XXDomainRequest to <a href=\"http:\/\/github.com\/eligrey\/libxdr\">libxdr<\/a>. The examples have been changed to use <code>new XDR()<\/code> instead of <code>new XDomainRequest()<\/code> so now <em>every<\/em> example works in IE8.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just recently installed Windows and downloaded IE8 again and it seems that pmxdr works fine with the exception of one small MessageEvent.source bug in the host library that I fixed in version 0.0.5. I went to check out if the XDomainRequest examples I created worked, and to my astonisment, they ALL failed except for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[15,83,91,103,187,192],"class_list":["post-344","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-browsers","tag-ie8","tag-javascript-libraries","tag-libxdr","tag-xdomainrequest","tag-xxdomainrequest"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pfpUD-5y","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/posts\/344","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":0,"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"wp:attachment":[{"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eligrey.com\/blog\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}