$.getJSON vs $.ajax json (v2)

Revision 2 of this benchmark created on


Description

jQuery $.getJSON() vs $.ajax() json

Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
$.getJSON()
$.getJSON('http://lab.laukstein.com/address-json/about.json', function(data) {
 document.title = data.title;
 $('#content').html(data.content);
});
ready
$.ajax() json
$.ajax({
 type: 'POST',
 url: 'http://lab.laukstein.com/address-json/about.json',
 dataType: 'json',
 success: function(data) {
  document.title = data.title;
  $('#content').html(data.content);
 }
});
ready

Revisions

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