4 ms·
We'd all be better off if they just stopped sending the UA string altogether
by nly 12y ago
We'd all be better off if they just stopped sending the UA string altogether
- kabdib 12y agoThese strings make the parser guy in me just twitch. Do they expect many, many web developers to reliably extract accurate meaning from them?
- dangrossman 12y agoMost developers would find and use a library rather than write their own parser. They pretty reliably extract the browser/version/platform/etc from the hundreds of thousands of UA strings you'll see in the wild. https://github.com/tobie/ua-parser https://github.com/tobie/ua-parser https://github.com/browscap/browscap https://github.com/browscap/browscap A user agent parser is built in to the PHP language as well. http://php.net/manual/en/function.get-browser.php http://php.net/manual/en/function.get-browser.php
- xg15 12y agoI think it's the other way around. This happens when a field that no-one ever defined a syntax for suddenly gets important and everyone tries to extract meaning from it using arbitrary contains() and substring() acrobatics...
- kabdib 12y agoSo it's organic and ill-defined . . . and people are parsing it. Lovely :-)
- guardian5x 12y agoSo much this. The UA string is flawed by itself. it shouldn't even be used anymore. The fact that browser manufacturers have to include all sorts of stuff is proof that this system doesn't work.