In this way I can measure the processing time of mine ajax call
var ajaxTime= new Date().getTime();
$.ajax({
type: "POST",
url: "some.php",
}).done(function () {
var totalTime = new Date().getTime()-ajaxTime;
// Here I want to get the how long it took to load some.php and use it further
});
but, how can I do if I want get the processing time for multiple ajax call at the same page?
I mean something like this:
var i;
var j = 5;
for (i = 0; i < j; i++) {
var ajaxTime= new Date().getTime();
$.ajax({
type: "POST",
url: "some.php",
}).done(function () {
var totalTime = new Date().getTime()-ajaxTime;
// Here I want to get the how long it took to load some.php and use it further
});
}
I need to know the response time for each call