Link to home
Start Free TrialLog in
Avatar of BooYaKaSha
BooYaKaSha

asked on

Determining a User's Bandwidth

Hello -

I have this idea I was thinking of implementing on some future projects, and I thought I'd run it by you experts to hear what you think.

Some Websites have a high bandwidth and low bandwidth version for broadband and dialup users. But usually it involves selecting which version you want to see.

I was thinking of developing a simple script that takes getBytesLoaded() over the Date() object to determine how much time it takes a user's browser to download a certain number of bytes to determine a transfer rate, then if they exceed a minimum requirement, automatically launch them into the high bandwidth version of the site. The code is easy enough.

But how reliable would this really be? It's hard to test this, cause I don't have access to an array of test computers with different connections. Would the Date() function (using milliseconds) be the most reliable way to measure time for this purpose? I was thinking of watching the getBytesLoaded() until it reaches a certain value, then determining how long it took to get to that value, then dividing one by the other ( /1024) to get Kps.

If so, how much data should I use for the test to be accurate without taking too much time?

Thanks for the advice -
Avatar of Xenophon
Xenophon

Always give the user choice imo... There might be some users on dialup who might prefer the BB connection, and viceversa anyhow...
-X
Avatar of BooYaKaSha

ASKER

Well, I'm thinking of having the ability to switch manually from a button on the site. But the idea itself....
ASKER CERTIFIED SOLUTION
Avatar of Xenophon
Xenophon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What do you think, if I measured like 10 or 20K you think that would be accurate enough?
The larger the better of course. The only way to be certain is by testing it. You should also probably take into consideration that the testing swf might be cached, thus providing you with misleading data.

hth
-X
hello BooYaKaSha,

there is a tool in flash called bandwidth profiler that u can run when testing ur movie.

this tool calculates the data loaded in different connections.

u can test ur movie on 14.4, 28.8, 56.6 and more download rates.
this will give u a very nice hint on how much time needed to download ur movie.

then when the client run ur movie. u can calculate the data loaded after 5 seconds for example. if the data loaded compared to the total data that should be loaded is too low ( will lead to wait for example 5 mins to load)  u should transfer the movie to a little bit lower one.

u r the one who should decide how much time the user should wait for the movie to download. the movie downloads in a specific rate. so u can download at any time how much data is loaded and compare it to the total downloaded bytes and then u can know how much time it will take to be completed.

hope this helps,
kanary.

if the
BooYaKaSha,
why didn't u comment on my comment? didn't u get any idea from my posting !!
Um, thanks for your comment, but it was not related to what I was talking about.

The bandwidth profilier, aside from not being the most accurate thing in the world, is good for me determining about how long it will take for someone to download my move.

What I am trying to do is test EACH INDIVIDUAL user, in essence figuring out on the fly whether they have dialup or broadband internet, then redirecting them to the appropriate high/low bandwidth versions of my site. You can't do this with Profilier -- its just for testing.

That way I can have a big spiffy version for those with Cable/DSL and a trimmed down version for those with 56k or less. Cool?
>> should also probably take into consideration that the testing swf might be cached, thus providing you with misleading data.

Good point. Do you know of a way to force a movie to be re-downloaded instead of using the user's browser cache?
beside the bandwidth profiler that works at design time, i gave u an idea on how to calculate the user download speed at run time.
by comparing how many loaded bytes with the total bytes in a specific time, and this way u can know how much time he will take to download the whole mivie, also u will know his download speed. this way u can forward him to what ever movie u like!!