Ajax JSONP vs Ajax JSON (v8)

Revision 8 of this benchmark created on


Description

Tests loading of large datasets

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<p>Number of elements: <span id="count">00</span></p>
<script>
  function loaded(data) {
    $('#count').html(data.length);
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Ajax JSONP
// async test
$.ajax({
 type: 'GET',
 url: 'http://ejohn.org/apps/jsonvxml2/jsonp-test/1600.js',
 dataType: 'jsonp',
 jsonpCallback: 'loaded',
 success: function() { deferred.resolve(); }
});
ready
Ajax JSON
// async test
$.ajax({
 url: 'http://ejohn.org/apps/jsonvxml2/json-test/1600.js',
 dataType: 'jsonp',
 success: function(data) { alert('hi');loaded(data); deferred.resolve(); }
});
ready

Revisions

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