I've got a page that will be loading a bunch of fairly high resolution images, as well as a full HD video. Is there a way to detect if someone is using cellular on their phone vs wifi, so I can use a lower resolution version of the image, and the video?Preferably I would like to do this in PHP, but if I can't using JavaScript is also an option.I thought about using the User Agent string but this would only tell me if its a mobile device, not if its on wifi or cellular. I've seen several suggestions saying to use IP databases but they all seem to cost money, and it's simply out of the question to pay for the database based on current financials.
How to tell if an incoming connection is a cellular network or not
php;javascript;mobile