4 ms·
> When did it become OK to trust user agent strings for feature or device detection? I never really understood the complaint against this. UA string detection
by ux-app 9y ago
> When did it become OK to trust user agent strings for feature or device detection?
I never really understood the complaint against this. UA string detection is good enough 99.99% of the time and sure it's not trustworthy in the sense that the end user can mess with it, but so what? If the user is messing with the the string they know what they're doing.
- guessmyname 9y ago> UA string detection is good enough 99.99% of the time I don't believe you, show me the data to back up such assumption.
- ec109685 9y agoWhy would a browser lie?
- guessmyname 9y agoBecause of this — http://webaim.org/blog/user-agent-string-history/ http://webaim.org/blog/user-agent-string-history/
- ux-app 9y agomy own experience? I've been developing for the web for 19 years. I know the issues with UA strings. It's an old argument. On the modern web, for the most part UA sniffing isn't necessary. If you do need it, there are plenty of libraries that will very reliably sniff strings which account for 99.99% of the web. Possibly mobile strings are an issue, but there are services like http://wurfl.sourceforge.net/ http://wurfl.sourceforge.net/ which will again get you to your 99%+ range. Of course do all the other things like feature detection, graceful degradation and progressive enhancement, but I find the entire argument a bit overblown.