Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
ajax 3.7.1 vs fetch
(version: 1)
Comparing performance of:
ajax vs fetch
Created:
10 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://code.jquery.com/jquery-3.7.1.min.js'></script>
Script Preparation code:
function showResult(data) { console.log(data); } var newUrl = "https://www.googleapis.com/discovery/v1/apis";
Tests:
ajax
var request = $.ajax({ type: "GET", url: newUrl, success: showResult, data: null });
fetch
fetch(newUrl) .then( function(response) { response.json().then(function(data) { showResult(data); }); } ) .catch(function(err) { console.log('Fetch Error :-S', err); });
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
ajax
fetch
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?