Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
fetch vs ajax call V3
(version: 1)
fetch vs ajax call
Comparing performance of:
Ajax vs Fetch
Created:
5 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
Script Preparation code:
function showResult(data) { console.log(data); } var newUrl = "https://splet.4a.si/204";
Tests:
Ajax
var request = jQuery.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:
Run details:
(Test run date:
one month ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36
Browser/OS:
Chrome 146 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Ajax
15080.8 Ops/sec
Fetch
18472.7 Ops/sec
Related benchmarks:
fetch vs ajax call
fetch vs ajax call Version 2
fetch vs ajax call fixed
fetch vs ajax call 999999
fetch vs ajax call (fixed)
new fetch vs ajax call
fetch vs ajax call - updated 2021
fetch vs ajax call V2
fetch vs ajax callt
Comments
Confirm delete:
Do you really want to delete benchmark?