title: XDomainRequest vs XMLHTTPRequest
body: <p>We are creating an application using PixiJS which has a dynamic json loader in it. </p>
  
  <p>It loads the .json files using the following:</p>
  
  <pre><code>if(window.XDomainRequest)
  {
      this.ajaxRequest = new window.XDomainRequest();
  }
  else if (window.XMLHttpRequest)
  {
      this.ajaxRequest = new window.XMLHttpRequest();
  }
  else
  {
      this.ajaxRequest = new window.ActiveXObject('Microsoft.XMLHTTP');
  }
  </code></pre>
  
  <p>Which seems to work everywhere except on windows phone and IE.
  However, if I swap XMLHttpRequest with XDomainRequest it works fine.</p>
  
  <p>So finally, can someone please explain the differences between XDomainRequest and XMLHTTPRequest? Which one should take precedence over the other? </p>