A tiny service worker script to change image quality dependant on connection type (2G, 3G, etc)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The Network Information API allows developers to determine the connection types and the underlying connection technology that the user agent is using. In terms of web performance, this brings a whole new level to the way that we build web pages. Being able to reliably determine whether or not a user has a slow 2G connection or a speedy Wifi connection allows developers to serve content accordingly.

If you'd like to learn more about using the Network Information API together with service workers, I have written an article on my blog at deanhume.com

Network Information API