0

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?

wordSmith
  • 2,833
  • 6
  • 24
  • 48

1 Answers1

0

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.

jcaron
  • 16,631
  • 5
  • 29
  • 43