17 ms·
Trying to re-solve the User-Agent issue, I think it would be much better if browsers claimed which standards they conform to, with an accompanying version. EG:
by mjevans 9y ago
Trying to re-solve the User-Agent issue, I think it would be much better if browsers claimed which standards they conform to, with an accompanying version.
EG: www/HTML<=5.1 www/XHTML<=1.1 www/CSS<=3.0 ISO/ECMAScript<=8
The string would be split on the field separator (any non-printing space?). All exact matches for specifications would be compared and the result ANDed. This way a range could be created by having a minimum supported version as well.
- ubernostrum 9y agoThe issue, as always, is bugs. I remember back when feature detection was gaining steam as the preferred alternative to user-agent sniffing, and Safari had a showstopper of a bug that meant preventDefault was present and callable but didn't actually do what preventDefault was supposed to do. So you had to fall back to sniffing for Safari to work around that (by hooking up a different event listener with a 'return false' instead of a preventDefault call).
- Klathmon 9y agoWe have feature detection for that which solves the worst problems. I'd much rather if the "version number" of the browser wasn't exposed, and instead something like a UUID that changes every "major version" for each browser. This lets developers blacklist specific browser versions if they are a problem, without allowing them to say "only works on chrome" or "fallback to this on safari at any version". I know this would be basically impossible to get everyone to agree on, but it's an interesting thought.
- laumars 9y agoAll you're doing there is replacing one arbitrary version identifier with another arbitrary version identifier. People would still know what browser you're running because we'd quickly see "rainbow tables" with UUIDs and the browsers they correspond too. So the problem you're attempting to solve would still exist.
- Klathmon 9y agoI would "fix" the problem of being able to target future versions of a browser without some kind of automatically updating system. It's not about making it impossible, it's about making it difficult enough that the "easy path" is feature detection (AKA "doing it right")
- laumars 9y agoI think you're underestimating peoples ability to waste time writing lengthy bad solutions which follow a behavior they're already familiar with, rather than properly researching a good solution.
- Klathmon 9y agoAgain, you can't fix everyone. If someone is dead set on doing useragent sniffing, they are going to do it. No technical solution is going to stop them. But by changing how the useragent works I think we can get rid of the vast majority who only do useragent sniffing because it's the "easy way out", it's the quick fix that will let them get back to development instead of fixing a bug or shimming a feature.
- digi_owl 9y agoUntil they out and out lie, like anything Chromium based do these days regarding Flash. If you have Flash installed, but the site is not whitelisted, Chromium will claim Flash is not installed to any JS detection code.