![]() |
Detect user's connection speed
I want to detect the user's connection speed to offer an improved website experience. As an example, use 20 records per page pagination, but allow the detection script to change that to higher or lower (as well as other things).
How is the best way to do this, and can someone point me in the right direction? Thanks. |
It can't be done in Javascript. Possibly flash or Java.
|
Rubbish, and it's JavaScript and Flash, not Javascript and flash.
|
using this, i'd say anything over 50 would be fast, anything over 500 would be really fast:
Code:
not too difficult to program either... |
Quote:
|
Quote:
|
Quote:
|
Quote:
Only thing is: Code:
new Date;Code:
new Date().getTime() / 100;So much better than the image download scripts I keep seeing. Thanks again. |
Quote:
i should also mention that you might consider is keeping track of the total time, subtracting delay and the dividing by 5. That math yields your average latency, another quality of service indicator. |
Thanks, but your script returned a score of 1-4 units depending on how I tested it (and I tested it on lots of different connection speeds).
Changing it as I have returns 1-400 units. It definitely needed changing. You said that anything over 50 would be fast, and 500 would be really fast. Your script would never return anything near 50, let alone 500. Quote:
|
Quote:
|
| All times are GMT +1. The time now is 07:14 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.