-
Is it possible to detect the speed of a connection with Javascript or any other scripting language? I would like to be able to detect if a person is on a 56K modem, DSL, or Cable. I noticed that Napster does this but I also realize that it was created with another language like C++ or something.
Thanks in advance,
-
Is it possible to detect the speed of a connection with Javascript or any other scripting language? I would like to be able to detect if a person is on a 56K modem, DSL, or Cable. I noticed that Napster does this but I also realize that it was created with another language like C++ or something.
Thanks in advance,
-
Actually, Napster doesn't detect the speed of a machine. What it does is read the user's information - I could specify that I'm using a 28.8 modem, where I really have a T3 line. Napster would still think I'm using a 28.8.
There are ways to detect connection speeds, but nothing that's really reliable (that I know of, anyway). The simplest thing to do, I guess, would be to create a Java Applet that sends and requests packets from the user's IP and use the average of that to guess at the speed. You can gauge download speeds (ie-how fast your files are being downloaded) by monitoring:
delta(packets sent - packets dropped)/delta(time)
It's not the most reliable way, but it would give a rough estimate. Either way, you'd have to create something akin to a full-blown application to pull that off.
Now, of course, there are more efficient ways of doing this and some of them might be easier, but I can't think of any offhand.
hth,
Deep (just a guy)
<font face="arial" size="2">
Pradeep Kumar Nair, B.Math
Senior Web Designer
http://www.blab.com
ICQ: 39102360
</font>