Question

I have a client whose desired Web UI is graphically intense; we would like to gather statistics on the average bandwidth of those connecting to the site. Is there an easy way to do that? The "simplest thing that could possibly work" would seem to be a Flash or Silverlight component that times the download of a file of some size (say 200K), then POSTing the result to a URI that saves the data. Will that work? Should I write my own or is there an easy drop-in element that I can download from somewhere?

Was it helpful?

Solution

I would look at Google Analytics. It's a simple javascript that you include on your page, and it uses Google's massive analytics databases to track who's accessing your site over what sort of connections, which is all in a database that they maintain.

You could certainly write a Flash or Silverlight (or javascript) component to download a file in the background, time it, and report that, but you're likely to anger your users for filling up their tubes.

OTHER TIPS

There aren't too many tools that do this.

You might try BrowserHawk (http://www.cyscape.com/products/bhawk/features.aspx). See http://www.cyscape.com/showbrow.aspx?bhcp=1 and scroll down to connection details.

Probably the most effective way though, is to let the visitor decide. You can have a landing page with two big buttons that say "fast connection" and "slow connection" and let them click one.

Remember that if you do that, you will lose a certain number of visitors at that page, as they will be too lazy or disinterested to bother clicking. You may want to just go with the heavy version of the site and have a button in the nav somewhere that lets them switch back and forth.

It seems pretty easy to me.

  1. Take your webserver logs and scan for your index page and all images linked from that index page.
  2. Get the difference between the last image complete timestamp and the index complete timestamp.
  3. Total up the size of all images that were fully loaded (not cached if-modified-since 304s).
  4. Divide that total by the time difference.

You should have effective bytes per second for that user.

The Apache webserver can log how long a request takes (in seconds); combine this with something like mod_logio to tell you how much data you're actually sending to the client and determine KB/sec.

http://httpd.apache.org/docs/2.0/mod/mod_logio.html

http://httpd.apache.org/docs/2.0/mod/mod_log_config.html -- look for '%...T'

Google has stopped recording users' connections speed from 2011. Here is the blog post from Google on March 23, 2011 -

https://analytics.googleblog.com/2011/03/fond-farewell-to-connection-speed.html

Not a direct answer - but you may be solving the wrong problem.

Depending on who you listen to, somewhere around 60% of website users are browsing on mobile devices. Mobile devices have highly unpredictable bandwidth - from "unlimited" when on a fast WiFi network to "1990s dialup" when away from the cell towers. If they spend 50% of their time on a 100Mbps corporate wifi, and half their time on a 500Kbps cellular network, the average will be a bad indication of their experience for 50% of the time.

If you look at the average and say "hey, the average is well over 10Mbps, so we can assume 1Mbps is a safe minimum", your users will have a terrible experience half of the time.

Also, there's a complex interplay between filesize, the number of concurrent downloads a web browser makes, and the subjective experience of the end user. If you have a webpage that in total requires 5000Kb download, and it doesn't render a thing until the page is fully downloaded, it will feel super slow. If you progressively load items, and lazy load as the user scrolls, the site will feel fast.

Next, you get browser caching - if you have a heavy site, but you can cache a lot of the assets in the browser, the subjective experience can be really good (after the first download).

My recommendation is to agree a minimum bandwidth your site will support with reasonable experience - and base this on the mobile network performance in your target market. In countries with good mobile coverage, I'd assume 500Kbps; in countries with widespread 4G, I'd go up to 1Mbps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top