0

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

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

});
ism
  • 288
  • 1
  • 5
  • 17

1 Answers1

1

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

Getting AJAX Request Duration

Community
  • 1
  • 1
sucil
  • 116
  • 2
  • 7
  • If you're just going to link to another question, flag it as a duplicate, don't post a link-only answer. – Barmar Oct 28 '16 at 20:17