W3C home > Mailing lists > Public > www-style@w3.org > March 2012

Re: [css4-mediaqueries] Bandwidth Media Queries

From: André Luís <me@andr3.net>
Date: Fri, 30 Mar 2012 12:01:13 +0100
Message-Id: <604E80C4-F066-4A19-AE59-A1E03A5F84A2@andr3.net>
To: www-style list <www-style@w3.org>

On Mar 30, 2012, at 10:14 AM, Lea Verou wrote:

> Looks like I forgot to comment on it. I think it's useful but hard or even downright impossible to implement:
> 
> - I doubt UAs or even the OS has access to this sort of information (at least without running some sort of speedtest).
> - Bandwidth is not static, it can fluctuate even on the same network. So to find out, the browser would have to run a speedtest at a specified interval. This would slow down performance or even be unacceptable in certain cases (e.g. data roaming)
> 
> Since there is an API for this [1], it could be done using a little bit of JS and classes, so that the author can control how often to query the result themselves.

True! But being able to query it via a media-query would be heaven-sent. :) 

Now, I believe there are two useful bandwidths that could be queried.

1) the speed of the interface the user is accessing your website with (100mb/s or 1gb/s on wired LAN, 54mb/s on wifi, XXkb/s on 3G, etc.)

and

2) the actual speed of the requests going to that host



Both are useful and can be used for different purposes. 

For instance, as an author, I could make some options depending on whether the user is accessing via WiFi or 3G. I'd use 1).

Now if I wanted more granular control over the current conditions of the network, I'd go with 2). 

Since the browser knows how long the requests to that host took, he can pretty much provide that "variable" to be queried. But I'm probably oversimplifying a complex measurement. ;)


All in all, what I'm trying to say is...  +1!

:-)

--
André Luís
@andr3

> 
> [1]: http://dvcs.w3.org/hg/dap/raw-file/tip/network-api/index.html#introduction
> 
> Lea Verou (http://lea.verou.me | @LeaVerou)
> 
> 
> On 30/3/12 01:09, Lea Verou wrote:
>> Proposal by Chris Coyier: http://css-tricks.com/bandwidth-media-queries/
>> 
> 

--
André Luís
http://id.andr3.net
Received on Friday, 30 March 2012 11:01:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:53 GMT