I am trying to capture timing for ajax requests triggered using jQuery.
For that I defined functions on jQuery.ajaxPrefilter
and options.complete
startTime
is set in the function defined for jQuery.ajaxPrefilter
and when the function defined for options.complete
is invoked I will set endTime
. The difference between endTime
and startTime
is my timing for the ajax call.
But somehow when an ajax response comes with HTML that has "script calls", both jQuery.ajaxPrefilter
and options.complete
methods are getting invoked.
Why are "script calls" routed through JQuery methods?