W3C home > Mailing lists > Public > public-device-apis@w3.org > January 2014

Re: Network Information API

From: Ehsan Akhgari <ehsan@mozilla.com>
Date: Thu, 16 Jan 2014 10:40:27 -0500
Message-ID: <CANTur_5wuAN4xMX3+ED-VMxKDdLLT+CgP3D181OkkPo6=CWjZQ@mail.gmail.com>
To: Marcos Caceres <w3c@marcosc.com>
Cc: Fernando Jiménez Moreno <ferjmoreno@gmail.com>, Francesco Iovine <f.iovine@gmail.com>, Mats Wichmann <m.wichmann@samsung.com>, "public-device-apis@w3.org" <public-device-apis@w3.org>
On Thu, Jan 16, 2014 at 10:14 AM, Marcos Caceres <w3c@marcosc.com> wrote:

> > > Also, the new NetInfo object might be useful to distinguish
> User-Agents implementing the latest spec from User-Agents implementing the
> specification v1 (2011). Something like:
> > >
> > > if (navigator.netInfo) { /* Upcoming W3C spec */
> > > }
> > > else if (navigator.connection) { /* W3C Working Draft 7 June 2011 */
> > > }
> >
> >
> > This is also a good point. I wonder how extended is the usage of the v1
> of this spec though. If I am not wrong the Android browser and PhoneGap are
> the only implementors of this API.
> >
> I think that's right. I remember Mounir saying that some version of this
> had shipped on Firefox for Android, but then was removed. So, hopefully no
> versioning code needed.
>

Unfortunately we ship this under the name navigator.mozConnection
everywhere, but on desktop we just have a default implementation returning
infinity for bandwidth and false for metered unconditionally.

Cheers,
--
Ehsan
<http://ehsanakhgari.org/>
Received on Thursday, 16 January 2014 15:41:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:33:03 UTC