Welcome to TalkGraphics.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    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,
    IP

  2. #2
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    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,
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    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>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •