3 ms·
> they used user agent sniffing instead of feature detection even though it work fine in Firefox This is one of my pet peeves – and which is why the User Agent
by outworlder 7y ago
> they used user agent sniffing instead of feature detection even though it work fine in Firefox
This is one of my pet peeves – and which is why the User Agent strings are so asinine (Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A5370a Safari/604.1).
Whitelisting features based on Browser type, version, device type, OS type or version, or any version for that matter is almost always wrong. Like 99% of the time – if you think your case is special, you are most likely wrong too.
Basically it boils down to: "why do I care that this software is running this specific version?" If you are not writing a deployment script and some such and the answer is "because it implements feature X, or displays Y behavior", well, check that.
I've also seen iPhone apps trying to figure out which device it was, to display assets. If you care about screen resolution, that's what you need to check. Your device table will become obsolete.
Features may be backported(like in this case), bugs may be fixed, new weird hardware combinations may be released. Your application is not guaranteed to be in sync when that happens.
- solarkraft 7y agoWhy is something like feature checking not used for software dependencies like libraries as well?
- zaphirplane 7y agoGun configure tried https://en.m.wikipedia.org/wiki/GNU_Build_System https://en.m.wikipedia.org/wiki/GNU_Build_System
- kevin_b_er 7y agoThey're all from an era where javascript couldn't do everything. Those various crud of "like Gecko" were to get servers to deploy HTML that fit the pattern of another browser. There were websites that gave you error pages if you weren't Internet Explorer. Nowadays it is far less necessary, but there are still browser-specific stuff involved.