title: Two ways to load image, why is using ajax faster?
body: <p>I have two ways for loading a image, to test the loading speed.</p>
  
  <p>First:</p>
  
  <pre><code>var img = document.createElement("img");
  var date1 = new Date().getTime();
  img.src = "xxx.png";
  img.onload = function() {
      var date2 = new Date().getTime();
      var delta = date2 - date1;
  };
  </code></pre>
  
  <p>Second:</p>
  
  <pre><code>var date1 = new Date().getTime();
  $.ajax({ url: "xxx.png",
           data: { _s: new Date().getTime(), },
           success: function () {
               var date2 = new Date().getTime();
               var delta = date2 - date1;
           }
         });
  </code></pre>
  
  <p>The above two ways I've tested many times. The second is 30% slower than the first, but I don't know why. Can anyone tell me why?</p>