How to calculate internet speed in server side node.js, From client side i am sending current time stamp while making the http request in query string.
client side code
var image = document.createElement("img");
image.width = 1;
image.height = 1;
image.src = url+"?"+new Date().getTime();
url looks like below
http://localhost:8080/server?1369654461767
Internet speed calculation can be done using start time, end time and downloadable file size of the request.
But, My problem above request is 1x1 pixel so image size can't be determined, and i don't want one separate sever call for calculating net speed.
Any solution for calculating internet speed using start time from client and data which is present in request and response.
Any idea will be helpful.