ism ism - 9 months ago 45
Ajax Question

how to get ajax duration from ajaxError

Is there a way to extract the duration that an ajax request took from the ajaxError call?

$(document).ajaxError(function (event, jqXHR, ajaxSettings, thrownError) {

});

Answer Source

I think using beforesend() and complete() is the easiest way to calculate it.

Getting AJAX Request Duration