Intent to Ship: Network Information API

288 views
Skip to first unread message

Josh Karlin

unread,
Jul 25, 2014, 9:14:21 AM7/25/14
to blin...@chromium.org, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, pe...@chromium.org, Alex Russell, mi...@chromium.org
Contact emails: jka...@chromium.org

Spec: http://w3c.github.io/netinfo/ (Editor's Draft)

Summary: Exposes the network connection type to window and workers via an attribute and adds an event to notify of connection type change.  Some expected use cases are documented in http://w3c-webmob.github.io/netinfo-usecases/.


Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?  Android and ChromeOS have complete support.  Windows, Mac, and Linux report "Unknown" when there is a network connection and "None" otherwise.  Improvements to the desktop types are in the works.

Demo link: None

Compatibility Risk
Firefox shipped on Android and FFOS in 31.  Desktop support coming.

OWP launch tracking bug: http://crbug.com/368358

Link to entry on the feature dashboard: 


Peter Beverloo

unread,
Jul 25, 2014, 9:19:29 AM7/25/14
to Josh Karlin, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, Alex Russell, mi...@chromium.org
Do you have an idea when Windows, Mac and Linux will be able to identify the actual type of connection (none vs. ethernet or wifi is probably the interesting case here)?

Is what we're shipping compatible with Firefox' implementation? It's too bad that we don't know Apple's opinion on this API.

Thanks,
Peter

Josh Karlin

unread,
Jul 25, 2014, 10:02:17 AM7/25/14
to Peter Beverloo, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, Alex Russell, mi...@chromium.org
Do you have an idea when Windows, Mac and Linux will be able to identify the actual type of connection (none vs. ethernet or wifi is probably the interesting case here)?

We had ethernet and wifi support in Windows but reverted it because the query added to startup time.  We'll fix that very soon.  Mac should have ethernet/wifi shortly after Windows as we have the logic to determine types, we just need to use it.  Linux eta is unknown.
 

Is what we're shipping compatible with Firefox' implementation? It's too bad that we don't know Apple's opinion on this API.

Yes, Firefox has implemented the same API.


Mounir Lamouri

unread,
Jul 25, 2014, 2:22:24 PM7/25/14
to Josh Karlin, blin...@chromium.org, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, pe...@chromium.org, Alex Russell, mi...@chromium.org
On Fri, 25 Jul 2014, at 23:13, 'Josh Karlin' via blink-dev wrote:
> *Is this feature supported on all five Blink platforms (Windows, Mac,
> Linux, Chrome OS and Android)? *Android and ChromeOS have complete
> support. Windows, Mac, and Linux report "Unknown" when there is a
> network
> connection and "None" otherwise. Improvements to the desktop types are
> in
> the works.

Wouldn't that be more honest to disable the API on Desktop instead of
returning dummy values? Returning "None" or "Unknown" seems to do more
harm than good.

-- Mounir

Ehsan Akhgari

unread,
Jul 25, 2014, 2:48:22 PM7/25/14
to Mounir Lamouri, Josh Karlin, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, pe...@chromium.org, Alex Russell, mi...@chromium.org
That is the reason we have not enabled the API on desktop yet, FWIW.  The thinking is that you need to feature detect the API anyway, so there is probably less harm in exposing in some Firefox environments than the usual.

Cheers,
Ehsan

Josh Karlin

unread,
Jul 25, 2014, 5:16:28 PM7/25/14
to Mounir Lamouri, blink-dev, Chris Bentzel, igri...@chromium.org, Sriram Saroop, Peter Beverloo, Alex Russell, mi...@chromium.org

Wouldn't that be more honest to disable the API on Desktop instead of
returning dummy values? Returning "None" or "Unknown" seems to do more
harm than good.

That would be fine with me.

Darin Fisher

unread,
Jul 25, 2014, 7:33:58 PM7/25/14
to Josh Karlin, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, Peter Beverloo, Alex Russell, Mike Tsao
LGTM

Josh Karlin

unread,
Jul 29, 2014, 7:24:44 AM7/29/14
to Darin Fisher, blink-dev, Chris Bentzel, igri...@chromium.org, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
The CLs to restrict the API to Android, ChromeOS, and IOS are in review: 



TAMURA, Kent

unread,
Jul 29, 2014, 10:08:35 AM7/29/14
to Darin Fisher, Josh Karlin, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, Peter Beverloo, Alex Russell, Mike Tsao
LGTM2.

- Shipping status of Firefox is good.
- I don't think browser implementation status differences would make serious compatibility issues because this type of information is not critical for many applications.

--
TAMURA Kent
Software Engineer, Google


Dimitri Glazkov

unread,
Jul 29, 2014, 11:27:28 AM7/29/14
to TAMURA, Kent, Darin Fisher, Josh Karlin, blink-dev, Chris Bentzel, igri...@chromium.org, sar...@chromium.org, Peter Beverloo, Alex Russell, Mike Tsao
LGTM3.

jka...@chromium.org

unread,
May 31, 2017, 11:38:50 AM5/31/17
to blink-dev, tk...@chromium.org, da...@chromium.org, jka...@google.com, cben...@chromium.org, igri...@chromium.org, sar...@chromium.org, pe...@chromium.org, sligh...@chromium.org, mi...@chromium.org
After *cough* three years *cough* the desktop platforms (OSX, Linux, and Mac) are ready to have network information (navigator.connection) switched on by default. I don't believe a separate intent-to-ship is necessary? But I at least wanted to give a heads up here.

Josh

Chris Harrelson

unread,
May 31, 2017, 11:45:09 AM5/31/17
to Josh Karlin, blink-dev, TAMURA, Kent, Darin Fisher, Josh Karlin, Chris Bentzel, Ilya Grigorik, sar...@chromium.org, Peter Beverloo, Alex Russell, mi...@chromium.org
Hi,

Is there any change to the compatibility landscape? Did more browsers implement?

Also, please make sure there is an up-to-date chromestatus.com entry listing the latest platform implementation status.

Chris

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/81cd4a8b-b6a1-4abf-81ed-8bbe9230224b%40chromium.org.

Josh Karlin

unread,
May 31, 2017, 12:02:01 PM5/31/17
to Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Ilya Grigorik, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
Updated ChromeStatus. Firefox has moved from implementing to shipped on mobile. No other support to my knowledge.

Chris Harrelson

unread,
May 31, 2017, 12:27:43 PM5/31/17
to Josh Karlin, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Ilya Grigorik, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
Ok. And it sounds like the specification is in about the same state as before? Has it seen a TAG review or any further standardization acceptance process?
Strangely, MDN still says no support even after all this time. That should be updated.

Chris


Josh Karlin

unread,
May 31, 2017, 12:36:04 PM5/31/17
to Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Ilya Grigorik, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
If you hit the 'mobile' tab you'll see it on https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation.

What I'm launching here is the same API as launched previously (connection.type and downlinkMax). There have been recent attributes added (effectiveType, downlink, and rtt) and those changes have their own intent thread.

No TAG review or further standardization to my knowledge, but Ilya would know better.

Josh



Boris Zbarsky

unread,
May 31, 2017, 12:46:07 PM5/31/17
to Josh Karlin, Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Ilya Grigorik, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
On 5/31/17 12:35 PM, Josh Karlin wrote:
> What I'm launching here is the same API as launched previously
> (connection.type and downlinkMax).

Note that these are precisely the parts of this API that are most
problematic and least likely to get buy-in from other browsers in their
current form.

Yes, I'm aware Firefox on Android ships them. That happened before we
had our current intent process in place and hence without effective API
owner review. I don't believe we have plans to add these attributes on
desktop in their current form in Firefox, for the reasons mentioned
earlier in this thread and in the Firefox intent thread that aimed to
ship them on desktop.

Again, this is mostly an informational thing in terms of what at least
one other vendor is thinking here.

-Boris

Philip Jägenstedt

unread,
Jun 1, 2017, 8:37:11 AM6/1/17
to Boris Zbarsky, Josh Karlin, Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Ilya Grigorik, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
Given the skepticism about these 2 attributes we've seen here and on the other thread, I think it'd be best to have a new Intent to Ship for the missing platforms. We should seriously consider if removing them is the better path long term, in which case we don't want to spread them further.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.

Ilya Grigorik

unread,
Jun 2, 2017, 1:52:03 PM6/2/17
to Philip Jägenstedt, Boris Zbarsky, Josh Karlin, Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
- NetInfo.type usage is ~0.9% [1]
- NetInfo.downlinkMax usage is ~0.5% [2]

The former is used by some sites as a crude "metered" signal: if type is cellular then X, otherwise Y. Yes, it's an imperfect signal but it is still directionally right and can be refined via the latter - e.g. if type is cellular and downlinkMax ~2G then X, otherwise Y. Also, as noted in NQE i2s [3], {effectiveType, rtt, downlink} are building on top of downlinkMax, so I don't think we can "deprecate" it as such. 

Perhaps downlink can subsume downlinkMax as a combined end-to-end and first-hop signal, but even there, I think there is merit in helping developers understand if the estimate provided by `downlink` is based on active measurement or the connection type of the first hop. In short, I think there are legitimate use cases for all of these attributes to co-exist -- yes, it's a nuanced API, but that reflects the complexity of the problem space and we should empower developers to experiment and decide on their own strategy for how to navigate this space.


As a next step here, I'd propose we iterate on ^ issue and, once resolved, circle back on this thread.

ig

Philip Jägenstedt

unread,
Jun 7, 2017, 8:40:57 AM6/7/17
to Ilya Grigorik, Boris Zbarsky, Josh Karlin, Chris Harrelson, blink-dev, TAMURA, Kent, Darin Fisher, Chris Bentzel, Sriram Saroop, Peter Beverloo, Alex Russell, Mike Tsao
It sounds like the 3 new attributes don't entirely remove the need for the 2 old ones, in which case we certainly shouldn't rush to remove them. As you suggest, let's wait for https://github.com/WICG/netinfo/issues/60 to run its course, to see if we could find something that's more likely to be implemented and shipped everywhere, or not.
Reply all
Reply to author
Forward
0 new messages