[Network Info API] Return type for navigator.conection on desktops
Reported by
ahsaneja...@gmail.com,
May 28 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0 Steps to reproduce the problem: Just type navigator.connection in console on a desktop version of Chrome. As of now, the 'effectiveType' is returned but 'type' is not returned. The specification is here: http://wicg.github.io/netinfo/#underlying-connection-technology What is the expected behavior? The 'type' should be returned. What went wrong? The 'type' is not returned. Did this work before? No Does this work in other browsers? No FF does not even support it on desktops... Guess moving back to Chrome. Chrome version: 66.0.3359.181 (Official Build) (64-bit) (cohort: Stable) Channel: stable OS Version: 10 Flash Version: In countries like India and Pakistan most of the people who use laptops on wifi are on a limited data connection. Those who use ethernet are on homebroadband on unlimited connection. This assumption is true above 80% of the time, however may not be true in western world. I'm making a PWA, and as a part of functionality, it fetches images, videos, stylesheet and other assets based on screen resolution and internet speed. This helps in deciding what would be a better choice to reduce data consumption for the end user. The users are given option to override it in PWA settings, but most dont bother and say that it takes long to load. So this is helpful on desktops/laptops.
,
May 29 2018
ahsanejaz26@ Thanks for the issue. Able to reproduce the issue on Mac OS 10.13.3, Windows 10 and Ubuntu 14.04 on the latest Canary 69.0.3443.0 and Stable 66.0.3359.181 by the steps mentioned in the original comment. On entering navigator.connection in console. cannot observe any value 'type' returned. This is a Non-Regression issue as this issue is observed from M 61 - 61.0.3158.0 build. On the prior builds, on entering navigator.connection in console, gave the output as Undefined. Attached are the screen shots for reference. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Jun 4 2018
+tbansal for status (and possible de-duplication).
,
Jun 4 2018
navigator.conection.type is not enabled on Windows or Mac OSX. I think it's currently enabled for only ChromeOS and Android (and may be Linux?). If you want to adapt the content based on network speed, I would suggest looking into navigator.connection.effectiveType which reflects the network quality available to the device. navigator.connection.effectiveType is available on all platforms. https://github.com/WICG/netinfo/issues/60 has some discussion on why navigator.connection.type is not available on all platforms. If you find errors with the estimates provided by navigator.connection.effectiveType, please file bugs. Thanks! |
||||
►
Sign in to add a comment |
||||
Comment 1 by susan.boorgula@chromium.org
, May 28 2018