WICG / netinfo

https://wicg.github.io/netinfo/
Other
95 stars 28 forks source link

ConnectionType harms me: My WiFi/Ethernet is metered and my cellular data is unmetered #32

Closed eligrey closed 8 years ago

eligrey commented 8 years ago

What purpose does the ConnectionType part of this API provide? What can I do with the information that a user is on WiFi vs cellular vs Ethernet? That information is completely useless to me as any of these connection types can be either metered or unmetered.

The only use I can see for ConnectionType is to assume that some connection types are metered, which will only harm the minority of users like me with metered WiFi and unmetered cellular data.

jkarlin commented 8 years ago

What purpose does the ConnectionType part of this API provide? What can I do with the information that a user is on WiFi vs cellular vs Ethernet? That information is completely useless to me as any of these connection types can be either metered or unmetered.

It allows websites to add preferences. Such as, "auto-play video on cellular connections".

igrigorik commented 8 years ago

Metered / unmetered is separate and independent signal - e.g. both network types may be metered but user may prefer one vs the other for some type of functionality.

I would love to provide metered/unmetered signal to applications. The problem is, getting this reliably and in a cross-platform way is very tricky.

eligrey commented 8 years ago

I was asking what use is ConnectionType, because metered information cannot be determined.

auto-play video on cellular connections

Why should I get a different experience from someone on WiFi just because it is common (but not universal) to have metered cellular data? Your example is acting on an assumption that a certain connection type is metered. If you can't expose if a connection is metered with this API, people like @jkarlin are going to make websites that discriminate features (auto-playing videos, asset resolutions) based on my connection type.

My question for you is what possible use is ConnectionType for when you don't assume certain types of connections are metered? The API already exposes connection max speed, which I can use to default to lower quality video playback for example.

I can't think of a single use of ConnectionType that doesn't have to do with assuming some are metered. Please help me understand.

I have >100 Mbps unlimited/unmetered LTE from Verizon and slower, limited/metered WiFi from Comcast. Not all cellular connections are metered and slow.

igrigorik commented 8 years ago

It's perfectly reasonable for an application to expose a user preference that modifies behavior based on ConnectionType. Whether the user toggles such setting because they're on metered connection is a completely separate concern, and one deferred to the user.

eligrey commented 8 years ago

@igrigorik How can you expect API users to use this API in the manner you suggest when even the official MDN demo of the NetInfo API assumes meteredness of some connections.

Notice how there's "wifi-only", "wifi and cellular-only", but no "cellular-only"? This user tried to follow your recommended usage of presenting it in settings and still forgot to include "cellular-only" because they probably assumed most cellular connections are metered, and most wifi connections are unmetered. That demo from MDN isn't sufficient for me with my metered wifi and unmetered cellular data.

Now think about random one-man dev teams working on websites. They're likely going to make the same mistakes or even just copy the options from the MDN demo.

I hope this helps illustrate my issue to you better. I think the max speed part of the NetInfo API can be beneficial, but ConnectionType is going to harm me because people are going to accidentally assume meteredness (even if they didn't intend to), which will affect their use of this API nonetheless.

igrigorik commented 8 years ago

@eligrey good catch on MDN article -- I agree that it needs to be updated.

Re, "one man dev-teams": bad developers will always find a way to shoot themselves in the foot, regardless of team size, project, or API. However, that should not prevent good developers from building richer and better experiences for the users, and ConnectionType is a building block for such features.

eligrey commented 8 years ago

Ok then. I just hope that maybe 2-3 years from now, if the majority of websites end up abusing this feature in a manner against your recommendations, that the W3C re-evaluates its usefulness. If it ends up mostly being used as you intended, that will be great and I would definitely appreciate devs using the API correctly.

See you in 2-3 years.