https://developer.mozilla.org/en-US/docs/Web/API/Network_Information_API
A nice alternative to sniffing the user agent to detect mobiles, also it might cover other things riding on a cellular connection as-well. You might for instance decide to serve a heavier page to desktops / laptops than you might to a mobile to avoid consuming too much data.
Currently a draft, but looks promising.
A nice alternative to sniffing the user agent to detect mobiles, also it might cover other things riding on a cellular connection as-well. You might for instance decide to serve a heavier page to desktops / laptops than you might to a mobile to avoid consuming too much data.
Currently a draft, but looks promising.







