3 ms·
Part of this problem is solved via the Client Hints spec (http://httpwg.org/http-extensions/client-hints.html#save-data http://httpwg.org/http-extensions/client
by inian 10y ago
Part of this problem is solved via the Client Hints spec (http://httpwg.org/http-extensions/client-hints.html#save-data http://httpwg.org/http-extensions/client-hints.html#save-dat...)
When the user turns this on in his preferences, Chrome sends this data to the server as a header and the server can respond accordingly. Your server can decide what images to omit or other optimisations if it sees the header. But this setting is applied at the browser-level and is not per connection.
The NetInfo API can help in this case but the current spec is still not the best way forward. For example, even if the user is on Wifi, he may be on someone's tethered network and might still want to get a light-weight page. Conversely, some cellular connections might have a very high limit and the user might want to get the best possible experience even though he is on a 3G network.
A user-preference per network connection type would be cool to have!