Re: Network Information API

On 16 January 2014 16:40, Ehsan Akhgari <ehsan@mozilla.com> wrote:

> 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.
>

Yes, navigator.mozConnection works quite well in Firefox for Android and
Firefox OS. Moreover, the BlackBerry 10 browser implements the W3C Working
Draft 7 June 2011.

Hope it helps!

Francesco <https://developer.mozilla.org/en-US/profiles/franciov>


>
> Cheers,
> --
> Ehsan
> <http://ehsanakhgari.org/>
>
>

Received on Thursday, 16 January 2014 23:07:23 UTC