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:
8 months ago
by:
Guest
Go 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:
4 months 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
Fetch
18K/s
Ajax
15K/s
View exact numbers
Test name
Executions per second
✓
Fetch
18,473 Ops/sec
Ajax
15,081 Ops/sec
Related benchmarks
new fetch vs ajax call
fetch vs ajax call V2
Comments
Confirm delete:
Do you really want to delete benchmark?