Is there a way I can get the length of an Ajax request done via jQuery's .load();
?
As in the amount of time it takes to send the request and load the elements from the corresponding page?
Is there a way I can get the length of an Ajax request done via jQuery's .load();
?
As in the amount of time it takes to send the request and load the elements from the corresponding page?
Just before the start of the .load
, store the current time: startTime = new Date();
. In the callback, get the current time again, and subtract the start time. You'll get the elapsed time in milliseconds.