title: jquery ajax readystate 0 responsetext status 0 statustext error
body: <p>I am getting the following error: <code>jquery ajax readystate 0 responsetext status 0 statustext error</code> when giving it:  <code>url(http://www.tutorialspoint.com/prototype/prototype_ajax_response.htm)</code>, however it's working fine when I give it <code>url(localhost:""/embparse_page)</code> on my localhost. </p>
  
  <p>I have tried using the headers which I found on a Google search, and I have used <code>beforeSend:""</code> too, but it's still not working.</p>
  
  <p>I think the main problem is: <code>XMLHttpRequest cannot load http://www.tutorialspoint.com/prototype/prototype_ajax_response.htm. Origin "local server" is not allowed by Access-Control-Allow-Origin.</code> but I don't understand it. </p>
  
  <p>Can anyone please explain the problem to me, as I'm quite new to this.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns:ng="http://angularjs.org"&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
      &lt;meta Access-Control-Allow-Origin="*" /&gt;
      &lt;title&gt;Page Parsing&lt;/title&gt;
      &lt;script type="text/javascript" src="/js/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script&gt;
      getit=function(){
          jQuery.support.cors = true;
          $.ajax({
              type:"GET",
              url:"http://www.tutorialspoint.com/prototype/prototype_ajax_response.htm",
              dataType:"html",
              crossDomain:true,
              beforeSend: function(xhr) {
                  xhr.overrideMimeType('text/plain;charset=UTF-8');
              },
              success:function(XMLHttpRequest,jqXHR ,data) {
                  //alert(data.title);
                  var starttitl=data.lastIndexOf('&lt;title&gt;');
                  var endtitl=data.lastIndexOf('&lt;/title&gt;');
                  var title1=data.substring(starttitl+7,endtitl);
                  alert(title1);
              },
              error:function(errorStatus,xhr) {
                  alert("Error"+JSON.stringify(errorStatus));
              }
          });
      }   
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="siteloader"&gt;
          &lt;input type="button" onclick="getit()" /&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>