Last modified: 2011-11-08 10:42:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34183, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32183 - Remove user-agent-sniffed client-* classes from mediawiki.page.startup
Remove user-agent-sniffed client-* classes from mediawiki.page.startup
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
All All
: Low minor (vote)
: 1.18.0 release
Assigned To: Brion Vibber
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 18:57 UTC by Brion Vibber
Modified: 2011-11-08 10:42 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2011-11-03 18:57:28 UTC
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.
Comment 1 Daniel Friesen 2011-11-03 19:01:02 UTC
+1

The idea of versions in a css class is ABSOLUTELY horrifying to top off the bad parts about browser sniffing in general.
Comment 2 Brion Vibber 2011-11-03 19:12:04 UTC
Only ones that seem to be in use in extensions are client-js and client-nojs, which are reasonably sensible.
Comment 3 Brion Vibber 2011-11-03 19:19:08 UTC
Done on trunk in r101860.
Comment 4 Antoine "hashar" Musso (WMF) 2011-11-08 10:42:25 UTC
marking bug for 1.18 tarball release since r101860 is tagged as such.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links