4 ms·
please stop doing stuff like this. its trivial to change the user-agent when making a request with a programming language, so any logic surrounding that should
by 38 2y ago
please stop doing stuff like this. its trivial to change the user-agent when making a request with a programming language, so any logic surrounding that should be non existent, or as simple as possible.
the user-agent string has an essentially arbitrary format, so its not really a good place to be reading data from, or worse serving a different response based on the value.
- zuck_vs_musk 2y agoThis is useful. If you have a website, you want to collect statistical data on which browsers are accessing your website and test for the best experiences on the top browsers.
- 38 2y agothat sounds nice, but history has shown thats never what happens. what REALLY happens is the most popular browser and even version is determined, and anything thats not that doesn't get tested, and eventually breaks. its the pinnacle of lazy programming. "lets use telemetry so that we can point to data that allows us to make software thats as brittle as possible".
- philosopher1234 2y agoThere are limited resources in the world. The bulk of the resources should go to the bulk of the users. It’s a feature that rare configurations are less tested
- tgv 2y agoIt's a (minor) necessary evil that gives useful information. Almost no-one spoofs their user agent. I use this to pin down problems on the user side. Our users have all kinds of weird devices (e.g. browsing with a PlayStation) and it can be hard to find where things go wrong. There was a case where we lost more users than usual, and it turned out to be something very subtle related to tab switching in Safari. Without the user agent, we would never have found out.
- 38 2y ago> Almost no-one spoofs their user agent. Citation needed
- mynameisvlad 2y agoAsk one of your non-tech friends to spoof a user agent. And see if they even know what a user agent is. They won’t. But also, what exactly were you expecting out of a citation? A survey done about whether people spoof their UA or not? That doesn’t exist and likely never will.
- 38 2y ago[flagged]
- mynameisvlad 2y agoI am well aware what it means. I asked you what you were expecting because it doesn't exist and probably never will. Nobody goes around surveying people about user agents. That just doesn't happen in the real world.
- dblohm7 2y ago(Former browser dev) Agreed. Feature detection is the way, not UA sniffing.
- 38 2y agoWhoosh