Sunday, 15 January 2012

javascript - Measuring server response time (client-side) -



javascript - Measuring server response time (client-side) -

this question has reply here:

find out how long ajax request took complete 3 answers

i implement script measure response time of server (= remote url) client using regular browser without plugins (java etc.).

i'm looking @ network speed (response time), not page loading speed.

what recommend me measure? has run on tcp/ip, not else icmp (ping).

how go around implementation on client side? prefer utilize javascript (jquery).

update: need cross domain check, ajax calls don't seem option

furthermore, ajax method doesn't seem precise @ all. results seem have overhead of 50ms (it's constant value, no matter domain - guess it's processing time in between) on testing machine in comparing info firebug

you need time request:

var senddate = (new date()).gettime(); $.ajax({ //type: "get", //with response body type: "head", //only headers url: "/someurl.htm", success: function(){ var receivedate = (new date()).gettime(); var responsetimems = receivedate - senddate; } });

javascript jquery client-side httpresponse response-time

No comments:

Post a Comment