title: jQuery ajax posting large data is slow in Chrome and Safari
body: <p>I have to make a bandwidth test with javascript and php, I use jQuery, and try all browsers, but:</p>
  
  <ul>
  <li>Firefox - UP: 7-8 Mbps</li>
  <li>Explorer 9 - UP: 7-8 Mbps</li>
  <li>Opera - UP: 7-8 Mbps</li>
  <li>Safari - UP: sometimes 800-900 kbps</li>
  <li>Chrome - UP: 100-200 kbps or no data</li>
  </ul>
  
  <p>Have you any idea to increase the performance of these browsers or other good technology to measure speed?</p>
  
  <pre><code>sendFile: function (s, d, m){ // size, data, metric
      m++; // how many times I tried to post data
      console.log('m: '+m);
      time = new Date(); 
      endTime3=time.getTime(); // execute time start
      if(s&lt;=65536){
          $.ajax({
              type : 'POST',
              url : '/vegpont/savszelesseg/',
              timeout: 30000,
              dataType: 'text',
              cache: false,
              data: {
                  index : 3,
                  text: d // large data, min 512 KB to 
              },
              success : function(data){
                  console.log('kB: '+s);
                  time = new Date(); 
                  endTime4=time.getTime(); // execute time end
                  console.log('sec: '+(endTime4-endTime3)/1000);
                  if(((endTime4-endTime3)/1000)&lt;sec){ // sec now equals 4
                      speedTest.createFile(s*2, m); // create a data which is 's' (aka size) large then call this sendfile method
                  }else{
                      var delta=(endTime4-endTime3)/1000;
                      var res=Math.round(s/delta);
                      $('div#speedResult3').html('&lt;b&gt;UP:&lt;/b&gt;&lt;br/&gt;kB: '+s+', '+
                      'sec: '+delta+'&lt;br/&gt;' +
                      '&lt;b&gt;~ '+res*8+' kbps&lt;/b&gt;');
                      $('div#speedResult3').slideDown(1000);
                      $('div.buttonContainer').unblock();
                  }
  
              },
              error : function(XMLHttpRequest, textStatus, errorThrown) {
                  if(textStatus=='timeout'){
                      if(m&gt;10){
                          $('div#speedResult3').html('&lt;b&gt;UP:&lt;/b&gt;&lt;br/&gt;sikertelen mérés');
                          $('div#speedResult3').slideDown(1000);
                          $('div.buttonContainer').unblock();
                      }
                      else{
                          speedTest.createFile(s, m); // create a data which is 's' (aka size) large then call this sendfile method
                      }
                  }
              }
          });
      }else{ ...
  </code></pre>