title: new XMLHttpRequest() doesn't work in chrome?
body: <p>I know it kind sounds silly ... it should work there ... but :</p>
  
  <pre><code>function fetch(id){
      var fetch = new XMLHttpRequest();
      fetch.open("GET", "/upload/status?X-Progress-ID=" + id);
      fetch.onreadystatechange = function () {
        console.log(fetch.readyState);
      }
      fetch.send(null);
  }
  </code></pre>
  
  <p>This code works in IE , in firefox ... i get all 4 states returned ... but when i try it in chrome i get absolutely nothing ... and i have absolutely no idea why...</p>
  
  <p><strong>I think you have already guessed the question , why it doesn't work ?</strong></p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Changed the code a little bit ...  As you have maybe already guessed , i work with nginx upload progress module , and this function is called everysecond to get the progress of the uploaded file ...  </p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>Well i tried to rewrite the thing $.ajax() , and i basically got the same result .. ie , firefox works , and chrome just gives me nothing . Here is a full code of the page:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="ru"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="static/js/jquery-ui-1.8.21.custom.min.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script&gt;
      function add() {
        if (parseInt(document.getElementById('count').getAttribute('value')) &lt; 8) {
          var input = document.createElement('input');
          input.setAttribute('type','file');
          input.setAttribute('multiple','');
          input.setAttribute('name','file[]');
          document.getElementById('multiple').appendChild(input);
          document.getElementById('multiple').appendChild(document.createElement('br'));
          document.getElementById('count').setAttribute('value',parseInt(document.getElementById('count').getAttribute('value'))+1);
        }
        else {
          alert('Можно загрузить не более 8 файлов за раз.');
        }
      }
      function progress() {
        var ms = new Date().getTime() / 1000;
        rq = 0;
        id = "";
        for (i = 0; i &lt; 32; i++) {
          id += Math.floor(Math.random() * 16).toString(16);
        }
        document.getElementById('upload').action = "/upload/share?X-Progress-ID=" + id;
  //      console.log("/upload/share?X-Progress-ID=" + id);
        document.getElementById('status').style.display = 'block'
        interval = window.setInterval(function () { fetch(id, ms); }, 1000);
        return true;
      }
      function fetch(id, ms) {
  //      console.log("/upload/status?X-Progress-ID=" + id);
  
  
        $.ajax({
          type: "GET",
          url: "/upload/status?X-Progress-ID="+id,
          dataType: 'text',
          complete: function(upload) {
            console.log('test');
            alert('test');
          }
        });
  
  //      var fetch = new XMLHttpRequest();
  //      fetch.open("GET", "/upload/status", 1);
  //      fetch.setRequestHeader("X-Progress-ID", id);
  //      fetch.open("GET", "/upload/status?X-Progress-ID=" + id);
  //      fetch.setRequestHeader("X-Progress-ID", id);
  
  //      fetch.onreadystatechange = function () {
  //        console.log('rorororo');
  //        console.log(fetch.readyState);
  //        if (fetch.readyState == 3) {
  //          console.log(fetch.responseText);
  //
  ////          if (fetch.status == 200) {
  //
  //            var now = new Date().getTime() / 1000;
  //            var upload = eval(fetch.responseText);
  //
  //            if (upload.state == 'uploading') {
  //              var diff = upload.size - upload.received;
  //              var rate = upload.received / upload.size;
  //              var elapsed = now - ms;
  //              var speed = upload.received - rq; rq = upload.received;
  //              var remaining = (upload.size - upload.received) / speed;
  //              var uReceived = parseInt(upload.received) + ' bytes';
  //              var uDiff = parseInt(diff) + ' bytes';
  //              var tTotal = parseInt(elapsed + remaining) + ' secs';
  //              var tElapsed = parseInt(elapsed) + ' secs';
  //              var tRemaining = parseInt(remaining) + ' secs';
  //              var percent = Math.round(100*rate) + '%';
  //              var uSpeed = speed + ' bytes/sec';
  //              document.getElementById('length').firstChild.nodeValue = parseInt(upload.size) + ' bytes';
  //              document.getElementById('sent').firstChild.nodeValue = uReceived;
  //              document.getElementById('offset').firstChild.nodeValue = uDiff;
  //              document.getElementById('total').firstChild.nodeValue = tTotal;
  //              document.getElementById('elapsed').firstChild.nodeValue = tElapsed;
  //              document.getElementById('remaining').firstChild.nodeValue = tRemaining;
  //              document.getElementById('speed').firstChild.nodeValue = uSpeed;
  //              document.getElementById('bar').firstChild.nodeValue = percent;
  //              document.getElementById('bar').style.width = percent
  //            }
  //            else {
  //              window.clearTimeout(interval);
  //            }
  ////          }
  //        }
  
  //      }
  //      fetch.send(null);
      }
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="post" enctype="multipart/form-data" id="upload" onsubmit="progress();"&gt;
    &lt;input type="hidden" id="count" value="1" /&gt;
    &lt;input type="hidden" value="GOBLEBOELBOE" name="secret"&gt;
    &lt;div id="multiple"&gt;
      &lt;input type="file" name="file[]" multiple /&gt;&lt;br&gt;
    &lt;/div&gt;
    &lt;input type="submit"&gt;
    &lt;a href="#" onclick="add();"&gt;add();&lt;/a&gt;
  &lt;/form&gt;
  &lt;div id="status" style="display: none;"&gt;
    &lt;table width="100%"&gt;
      &lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;загрузка&lt;/th&gt;&lt;th&gt;осталось&lt;/th&gt;&lt;th&gt;всего&lt;/th&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;время:&lt;/td&gt;&lt;td id="elapsed"&gt;∞&lt;/td&gt;&lt;td id="remaining"&gt;∞&lt;/td&gt;&lt;td id="total"&gt;∞&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;размер:&lt;/td&gt;&lt;td id="sent"&gt;0 b&lt;/td&gt;&lt;td id="offset"&gt;0 b&lt;/td&gt;&lt;td id="length"&gt;0 b&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;скорость:&lt;/td&gt;&lt;td id="speed"&gt;n/a&lt;/td&gt;&lt;/tr&gt;
    &lt;/table&gt;
    &lt;div style="border: 1px solid #c0c0c0;"&gt;
      &lt;div style="background: #c0c0c0; width: 0%; text-align: right;" id="bar"&gt;0%&lt;/div&gt;
    &lt;/div&gt;
    &lt;a href="#" onclick="if (confirm('Вы точно хотите отменить загрузку?')) window.location = '/'" id="cancel"&gt;cancel_upload();&lt;/a&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>ANSWER:</strong> <a href="http://code.google.com/p/chromium/issues/detail?id=45196" rel="nofollow">http://code.google.com/p/chromium/issues/detail?id=45196</a></p>