Wikimedia wikis page views (February 2016):
|Total||Grade A||Grade X||Grade C|
|16002 M||13804 M||1465 M||732 M|
- Grade A: Browsers passing the startup sniffer, get JS, and we officially support them. (e.g. Chrome, IE9+)
- Grade X: Browsers passing the startup sniffer, get JS, but we don't officially support them (e.g. Iceweasel, UC Browser, Yandex).
There is no technical distinction made between Grade A and X. Just that we don't regularly test in Grade X browsers, nor prioritise issues specific to those. More details at https://www.mediawiki.org/wiki/Compatibility#Browsers.
We currently split between Grade C and Grade A+X by sniffing for Grade C user agent strings. This blacklist is getting rather long. Once upon a time it was just IE <= 5, but it's grown much larger since. (see startup.js#isCompatible)
Converting to a feature test would:
- ... shrink this critical code path (T127328).
- ... make it more maintainable.
- ... give the blacklist a lot more meaning. Allowing us to confidently use features without conditionals or theoretical fallbacks.
- ... older versions of browsers that we no longer support will automatically fall in the right category.
This article about BBC web developers "cutting the mustard" reminded me of the important of feature detection: