3 ms·
Oh man, what a mess! The UA string mentions almost every browser except the one it actually is... I understand the reasons, but I think it might be time for a
by emilecantin 7y ago
Oh man, what a mess! The UA string mentions almost every browser except the one it actually is...
I understand the reasons, but I think it might be time for a big "reset", and for browsers to stop lying about who they are.
- wlesieutre 7y agoIt does mention it at the very end. Either "Edge/18.18362" or "Edg/75.0.109.0" But yes, user agents are terrible.
- Analemma_ 7y ago> but I think it might be time for a big "reset", and for browsers to stop lying about who they are The problem is, you can't do this unless every website also "resets" at the same time, because the bad UA detection code will still be out there. The vendors aren't any happier with this situation than we are, but they do it because they have no choice.
- emilecantin 7y agoWho still does user-agent sniffing? I can't remember the last time I saw UA-detection code. Feature-detection and polyfills have been a thing for more than a decade at this point. EDIT: Just for kicks, I'll try it. I just downloaded a User-Agent extension, and I'll set my UA to "Chrome 74", and see if anything breaks.
- jefftk 7y agoI was working on a product that did user-agent sniffing to figure out which image formats were supported (when to serve WebP). A feature-detection based approach is substantially slower because it breaks the preload scanner: https://www.jefftk.com/p/why-parse-the-user-agent https://www.jefftk.com/p/why-parse-the-user-agent
- Dylan16807 7y agoThat was true in 2014! But since 2015 we've had the <picture> element to pick different versions of an image based on screen or capability.
- emilecantin 7y agoAfter almost a day, the only website that broke is Netflix; they send me to a help page about the browsers they support.