User-Agent Sniffing Criticism
Comments criticize user-agent string detection as unreliable, hacky, and outdated, advocating for alternatives like Client Hints or freezing/removing UA strings entirely.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Good. User-Agent detection has always been a hack.
nope, user agent sniffing is alive and well. Google is especially guilty, but lots of sites do it. Try changing your user agent and see how many things break.
Offtopic though, You might want to read how user agent strings have evolved - http://webaim.org/blog/user-agent-string-history/
Totally agree.https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_de...
User agent sniffing? Seriously? I thought that died the death it deserved a decade ago.
User-agent isn't nearly reliable enough to do that with.
User agent isn't reliable enough to do this and definitely wasn't intended to be used this way, so you're just asking for brittle code. Supposedly Chrome is freezing its user agent very soon, so it's not even a good path going forward.
It is probably time for browsers to stop sending a user agent string.
User agent sniffing is unreliable and evil.
Tying your entire web app to user agent sniffing. What could possibly go wrong!?