Page MenuHomePhabricator

Remove user-agent-sniffed client-* classes from mediawiki.page.startup
Closed, ResolvedPublic

Description

Browser sniffing is unreliable, dangerous, and generally nasty and should almost never be used.

mediawiki.page.startup.js adds classes to the <html> document element for the client name, version, and a couple other bits -- their presence encourages usage of sniffing to enable/disable features.


Version: 1.20.x
Severity: minor

Details

Reference
bz32183

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:59 PM
bzimport set Reference to bz32183.

+1

The idea of versions in a css class is ABSOLUTELY horrifying to top off the bad parts about browser sniffing in general.

Only ones that seem to be in use in extensions are client-js and client-nojs, which are reasonably sensible.

marking bug for 1.18 tarball release since r101860 is tagged as such.