473,287 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Switch content if low bandwidth

Is there a way where I can "guess" what relative speed the user's
connection is?

Currently, the client is wanting some graphical intensive content and
I'd like to be able to warn users on dial-up to allow them to go to a
"gracefully degraded" version.

I thought of simply putting up a question for users to answer but the
client would rather it happen, more or less, automatically.

Andrew Poulos
Sep 24 '07 #1
7 4040
Andrew Poulos wrote:
Is there a way where I can "guess" what relative speed the user's
connection is?
No. Ask them instead.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Sep 24 '07 #2
pr
Andrew Poulos wrote:
Is there a way where I can "guess" what relative speed the user's
connection is?
You could adopt the approach used by "test your internet connection"
sites, calculating a connection speed from the time taken to download an
image of a known size. It's not infallible, but should be able to tell
a dial-up from a fast cable connection on most occasions.

There's one at http://bandwidthplace.com/speedtest/. Run a free test and
view source on the "testing..." page.
Sep 24 '07 #3
On Sep 23, 11:41 pm, Andrew Poulos <ap_p...@hotmail.comwrote:
Is there a way where I can "guess" what relative speed the user's
connection is?

Currently, the client is wanting some graphical intensive content and
I'd like to be able to warn users on dial-up to allow them to go to a
"gracefully degraded" version.

I thought of simply putting up a question for users to answer but the
client would rather it happen, more or less, automatically.

Andrew Poulos
....

I reckon you could start the download of a test image, record the time
before it loads, and thereafter. I'd still give the user a chance to
set their own speed though.

Sep 24 '07 #4
pr wrote:
Andrew Poulos wrote:
>Is there a way where I can "guess" what relative speed the user's
connection is?

You could adopt the approach used by "test your internet connection"
sites, calculating a connection speed from the time taken to download an
image of a known size. It's not infallible, but should be able to tell
a dial-up from a fast cable connection on most occasions.
It cannot. Because it cannot detect how much caching is involved.

The most ridiculous part of this test is that you have to select the region
you are in. As if that would mean anything in a globally distributed,
routed network.
PointedEars
Sep 24 '07 #5
On Sep 24, 9:50 am, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
pr wrote:
Andrew Poulos wrote:
Is there a way where I can "guess" what relative speed the user's
connection is?
You could adopt the approach used by "test your internet connection"
sites, calculating a connection speed from the time taken to download an
image of a known size. It's not infallible, but should be able to tell
a dial-up from a fast cable connection on most occasions.

It cannot. Because it cannot detect how much caching is involved.

The most ridiculous part of this test is that you have to select the region
you are in. As if that would mean anything in a globally distributed,
routed network.
Perhaps the point of this test is not to directly detect the user's
actual connection speed, but their connection speed relative to your
server. Therefore, if your server is in the U.S.A. but the user is in
South Africa, they may well have a T1 connection, but the effective
speed is like a dialup connection. That may give you all the
information you need to determine that "rich," heavy content will take
a long time to download as well.

-David
Sep 24 '07 #6
David Golightly wrote:
Perhaps the point of this test is not to directly detect the user's
actual connection speed, but their connection speed relative to your
server. Therefore, if your server is in the U.S.A. but the user is in
South Africa, they may well have a T1 connection, but the effective
speed is like a dialup connection. That may give you all the
information you need to determine that "rich," heavy content will take
a long time to download as well.
Given the number of possible different ways each packet could be routed from
host A to host B in a WAN such as the Internet, the results are utterly
insignificant, no matter the connection.
PointedEars
--
"Use any version of Microsoft Frontpage to create your site. (This won't
prevent people from viewing your source, but no one will want to steal it.)"
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>
Sep 24 '07 #7
Thomas 'PointedEars' Lahn wrote:
David Golightly wrote:
>Perhaps the point of this test is not to directly detect the user's
actual connection speed, but their connection speed relative to your
server. Therefore, if your server is in the U.S.A. but the user is in
South Africa, they may well have a T1 connection, but the effective
speed is like a dialup connection. That may give you all the
information you need to determine that "rich," heavy content will take
a long time to download as well.

Given the number of possible different ways each packet could be routed from
host A to host B in a WAN such as the Internet, the results are utterly
insignificant, no matter the connection.

Which shows a remarkable ignorance of how backbone ISP routing is
*actually* done.

Stick to Java script P.E. You can't be an expert in everything, and
trying may not be a wise course if you don't want to look foolish.

In practice, between any two point in the internet, there are normally
just two routes at the IP level. The route there and the route back.

Unless a fault occurs they will tend to persist, being the ones
calculated to be the most advantageous by the ISPs in between.

You can tell this is so using traceroute, which explores the forward route.

It nearly always shows the same set of machines up the route..
Whilst in theory the actual usable bandwidth of any given point to point
connection cannot be guaranteed exactly, it is generally between 20% and
100% of the bandwidth of the weakest link. Any more is impossible, any
less is generally synonymous with severe packet loss and users giving up
on the link or the ISP upgrading the link to get packet loss down.

So very meaningful tests can be done on any given link: the transfer of
e.g. a random image or some such, timed, will give a good indication of
transit speeds and because it is random, will not be cached..

Now thats the bit I DO know about. The Javascript I don't, so over to
someone who does, to indicate how to time a download...
Sep 24 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Bozo Schmozo | last post by:
Greetings! I've searched groups.google.com already to see if I can determine if using PHP/MySQL (if needed) for a web site I wish to develop. As the subject indicated, it will be a content...
10
by: clueless_google | last post by:
hello. i've been beating my head against a wall over this for too long. setting the variables 'z' or 'y' to differing numbers, the following 'if/else' code snippet works fine; however, the ...
3
by: Lee Chapman | last post by:
Hi, I want my ASP.NET web application to use a custom HtmlTextWriter. i.e. I want the object that the Framework passes to System.Web.UI.Control.Render() to be my own object, MyHtmlTextWriter,...
19
by: rdavis7408 | last post by:
Hello, I have four textboxes that the user enters the price per gallon paid at the pump, the mileage per gallon and I would like to then calculate the cost per gallon and use a switch statement to...
10
by: lg | last post by:
My site consists of many htm pages and each has a banner with my address and some graphic. Now each html page is something like this: <html> blah blah <div> my logo my address </div>
2
osward
by: osward | last post by:
Hello there, I am using phpnuke 8.0 to build my website, knowing little on php programing. I am assembling a module for my member which is basically cut and paste existing code section of...
0
by: jrayasam | last post by:
Hi, I have a simple client server application which communicates through sockets. There is a content switch in between client and server that routes the request to a proper server machine. This...
3
by: C. Feldmann | last post by:
Hello, I have stumbled upon a problem, for which I can’t seem to find a solution for. I would like to offer files for downloading. To allow files to have duplicate names I renamed as random...
2
by: Annalyzer | last post by:
My form looks like this: <form action="handle_event.php" method="POST" enctype="multipart/form-data"> <table id="event_edit" border="0"> <tr> <td> ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.