I am following the sample shown here How to detect internet speed in Javascript? where an image with known file size is downloaded from the web and the speed is determined. For