views:

62

answers:

1

Hi,

I have to tell to the user in a web application(using struts) the download speed. What is the best way?

For the moment I simply have a .jsp filled with java scripts and I calculate the time it takes to the user to load this .jsp(I make this action 3 times and take the average speed). It worked ok when I had slow connection speed(under 1mb) but for bigger speed connection the values where wrong(to small; and if I put somebody from another country to test it-the connection speed results are even smaller).

The jsp size (taken with YSlow add-on from Mozilla) was little:70kb (gzipped) so I raised it to 260kb and still doesn't show the right value.

I have to mention that I cannot download a file to the user and that is because I have to do a little test of compatibility of the application with the user network,browser..etc and the application means a lot of java script on the client side and the average size of a jsp file is 70kb(gzipped)<-that's why I tried at start with this size.

Could you please give me an advice, I'll appreciate

Luisa

A: 

You think the best way to do it is use client side (javascript for example). If you want more specific data you need to do some downloads in the loop (100k, 1M, 5M).

http://ditio.net/2008/08/06/detect-connection-speed-with-javascript/

iddqd
Downloads in a loop..how to do that?I download 100k, then 1M..when I stop?
Look at source code of this page http://www.pcpitstop.com/internet/BwDownTest.asp
iddqd