json/jsonp (v25)

Revision 25 of this benchmark created by Emir Kurtovic on


Description

Ajax call speed test

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="test"></div>

Test runner

Ready to run.

Testing in
TestOps/sec
Ajax JSONP
$.ajax({
  type: 'GET',
  url: 'http://jsperf.com/api/jsonp',
  dataType: 'jsonp',
  success: function(data) {
    $('#test').html(data.content);
  }
});
ready
Ajax JSON
$.ajax({
  type: 'GET',
  url: 'http://jsperf.com/api/json',
  dataType: 'json',
  success: function(data) {
    $('#test').html(data.content);
  }
});
ready

Revisions

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