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.

📉 Falling 0.5x Web Development
2,388
Comments
20
Years Active
5
Top Authors
#3937
Topic ID

Activity Over Time

2007
2
2008
12
2009
35
2010
59
2011
62
2012
113
2013
127
2014
118
2015
62
2016
95
2017
123
2018
84
2019
260
2020
336
2021
147
2022
208
2023
215
2024
135
2025
190
2026
5

Keywords

US JS mobiforge.com KHTML mozilla.org modernizr.com WEI CH i.e AppleWebKit user agent agent user browsers strings detection string browser sites chrome

Sample Comments

nerd_in_rage • Nov 6, 2012 • View on HN

Good. User-Agent detection has always been a hack.

notatoad • Mar 6, 2018 • View on HN

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.

rampr • Sep 10, 2012 • View on HN

Offtopic though, You might want to read how user agent strings have evolved - http://webaim.org/blog/user-agent-string-history/

gtirloni • May 16, 2018 • View on HN

Totally agree.https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_de...

technomancy • Mar 14, 2015 • View on HN

User agent sniffing? Seriously? I thought that died the death it deserved a decade ago.

JohnFen • Jul 17, 2024 • View on HN

User-agent isn't nearly reliable enough to do that with.

dehrmann • Jun 27, 2020 • View on HN

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.

jrockway • Feb 22, 2019 • View on HN

It is probably time for browsers to stop sending a user agent string.

steveax • Aug 31, 2013 • View on HN

User agent sniffing is unreliable and evil.

stephenr • Mar 18, 2024 • View on HN

Tying your entire web app to user agent sniffing. What could possibly go wrong!?