Network Information API is highly valuable for Web pages to tailor content based on end user's network. For instance not autoplaying videos on slow or metered connections, using lower-resolution assets on 3G vs LTE, etc...
I am sure having this API implemented on at least iOS/Safari would be very much appreciated by the web community.
As the spec openly admits, this would be a privacy disaster because of fingerprinting opportunities.
Fair point but how about partial support? Just having `connectionType` can go a long way.
*** Bug 212936 has been marked as a duplicate of this bug. ***
+1, even having just "cellular" and "unknown" in connectionType would be extremely valuable in terms of being able to know if the user is likely on a metered connection.
If even this is seen as an unacceptable additional amount of bit of fingerprinting surface, we could require a user gesture (and this would still be valuable to most interested applications).
(In reply to Justin Uberti from comment #4)
> +1, even having just "cellular" and "unknown" in connectionType would be
> extremely valuable in terms of being able to know if the user is likely on a
> metered connection.
> If even this is seen as an unacceptable additional amount of bit of
> fingerprinting surface, we could require a user gesture (and this would
> still be valuable to most interested applications).
Heuristics could potentially be based on public IP addresses + device type to emulate cellular.
Also, in general, exposing cellular might be an issue, for instance MacOS devices using the cellular connection of iOS devices would have cellular=false.
I considered the private IP heuristic, but this is complicated by mDNS, and some carriers may not assign public IPs (e.g. NAT64).
The main thing we would want to avoid here is sending a high data rate stream on a metered connection, since you could burn through your entire data plan quickly at 40 Mbps. Tethering is as you mention something that this API would not cover, but that is an edge case, and one could argue that people using tethering are largely aware of the risks.
I have rebooted the Network Information API based on long-going discussions with Yoav Weiss and would appreciate you all's feedback:
- Motivational doc: https://docs.google.com/document/d/1RDA23zSNdDuIcxZTX9Xo3zlD2fxf8dZg9-e0YaJQv0g/edit?usp=sharing
- Explainer: https://github.com/tomayac/netinfo/blob/relaunch/README.md
- Spec draft: https://ghcdn.rawgit.org/tomayac/netinfo/relaunch/index.html
*** Bug 172643 has been marked as a duplicate of this bug. ***