Mateusz Sokoła
Mateusz Sokoła

Reputation: 83

Count time between send Ajax request and receive answer

Is there a method to get time between send request and receive answer or do I need to do it manually?

Framework: Vanilla JS

Regards, Matt

Upvotes: 2

Views: 1406

Answers (1)

Suresh Atta
Suresh Atta

Reputation: 121998

Unfortunately No.

You have to do it manually.Here is a sample code and article.

And the technique is

 var duration = (endTime - startTime)/1000;

And here is a working fiddle

Upvotes: 1

Related Questions