[whatwg] Bandwidth media queries

Boris Zbarsky bzbarsky at MIT.EDU
Sun May 20 06:04:39 PDT 2012

On 5/20/12 5:45 AM, Paul Irish wrote:
> Since no one mentioned it, I just wanted to make sure this thread is aware
> of the Network Information API [1], which provides
> navigator.connection.bandwidth
> It's been recently implemented (to some degree) in both Mozilla [2] and
> Webkit [3].

As far as I can tell, the Mozilla implementation always returns Infinity 
for .bandwidth.

And this is perfectly compliant, since the spec says:

     The user agent must set the value of the bandwidth attribute to:

         0 if the user is currently offline;
         Infinity if the bandwidth is unknown;
         an estimation of the current bandwidth in MB/s (Megabytes
         per seconds) available for communication with the browsing
         context active document's domain.


More information about the whatwg mailing list