title: XMLHttpRequest status 0 (responseText is empty)
body: <p>Cannot get data with XMLHttpRequest (status 0 and responseText is empty):</p>
  
  <pre>
  xmlhttp=new XMLHttpRequest();
  xmlhttp.open("GET","http://www.w3schools.com/XML/cd_catalog.xml", true);
  xmlhttp.onreadystatechange=function() 
  {
    if(xmlhttp.readyState==4)
      alert("status " + xmlhttp.status);
  }
  xmlhttp.send();
  </pre>
  
  <p>It alerts "status 0".</p>
  
  <p>The same situation with the localhost request (cd_catalog.xml is saved as a local file)</p>
  
  <pre>
  xmlhttp.open("GET","http://localhost/cd_catalog.xml", true);
  </pre>
  
  <p>But with the localhost IP request</p>
  
  <pre>
  xmlhttp.open("GET","http://127.0.0.1/cd_catalog.xml", true);
  </pre>
  
  <p>and with the local file request</p>
  
  <pre>
  xmlhttp.open("GET","cd_catalog.xml", true);
  </pre>
  
  <p>everything is OK (status 200)</p>
  
  <p>What can cause the problem (status=0) with the online request?</p>
  
  <p>PS: Live HTTP Headers shows that everything is OK in all 4 cases:</p>
  
  <pre>
    HTTP/1.1 200 OK
    Content-Length: 4742
  </pre>
  
  <p>PS2: Apache local web server on VMWare (host OS Win7, Guest OS Ubuntu, Network adapter – NAT). Browser – Firefox.</p>