Native XHR vs jQuery ajax (v11)

Revision 11 of this benchmark created by Charles on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js">
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery 1 Ajax
var request = $.ajax({
  type: "GET",
  url: "http://jsperf.com",
  success: function() {
    // done 
  },
  data: null
});
ready
jQuery 2 Ajax
var request = $.ajax({
  type: "GET",
  url: "http://jsperf.com",
  success: function() {
    // done 
  },
  data: null
});
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.