Re: [css4-mediaqueries] Bandwidth Media Queries

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 UTC