title: Is there any way to bypass NS_ERROR_DOM_BAD_URI when cross site access is disabled?
body: <p>I'm doing an XSS report for my university, and I'm doing some tests with calling external webpages using AJAX.</p>
  <p>The code I'm using for this example is very simple, and one of my target case-studies is to be able to call an outside web-page via AJAX with cross site disabled.</p>
  <h3>Note:</h3>
  <p>I only plan to use this on FireFox, and I am not concerned about IE compatibility.</p>
  <pre><code>&lt;script&gt;
      var xmlhttp=new XMLHttpRequest();
      xmlhttp.onreadystatechange=function(){
          if(xmlhttp.readyState==4)
          {
              alert(xmlhttp.responseText);
          }
      }
      xmlhttp.open(&quot;GET&quot;,&quot;http://example.com&quot;,true);
      xmlhttp.send(null);
  &lt;/script&gt;
  </code></pre>
  <p>Now the problem here is that <em><strong>uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)</strong></em> is thrown. I've been searching around and the best piece of information I found to bypass this was using jquery with json, but that doesn't suit me, and another example was <a href="http://khayyam.developpez.com/articles/web/ajax-cross-domain/" rel="nofollow noreferrer">this one (in french)</a>.</p>
  <p>Can anyone explain me how to do this? Or is it just unsolvable due to the <em>same origin policy</em>?</p>
  <p><strong>Edit</strong>:</p>
  <p>If anyone knows, how does Google post the values through Google analytics? Or this problem only happens for get and not for post? Some help would be nice.</p>