Don’t use the Network API

282

I’m a big fan of device APIs but please don’t use the Network API.

The intention of the API is innocent enough: to provide a user’s connection type, bandwidth and whether it’s metered or not so we can deliver a more gentle experience to users on slow or expensive connections. There are a few problems with this though:

  • We’re jerks that think it’s OK to serve up 1MB to mobile so let’s be honest, rather than tailoring the experience for users on slow or expensive connections, we’re going to use the Network API as an excuse to push more crap down the pipe for users we’ve ‘detected’ as supporting it.
  • Even detecting approximate bandwidth is near impossible without receiving a lot of data which defeats the purpose for detecting bandwidth in the first place. Bandwidth also fluctuates widely when moving inside a mobile network. The spec recognises these problems and I don’t see any solution on the horizon.
  • Did you know that you can set mobile metering levels via Android 4.1 data usage settings? Well done if you did, most users probably don’t and even if they did, we make a huge assumption that because a user is on a metered connection, they want less content: My mobile is metered in NZ but I never get close to using 50% of my data cap and wouldn’t want content choices made for me because of this.

And this is what I think is missing from the Network API: user choice. We’re trying to be clever using suspect network metrics to make assumptions about what a user wants. We could instead simply ask them and I wish the Network API included a user preference attribute that did just that.