On Thu, Nov 8, 2012 at 5:17 PM, Tim Starling <tstarling(a)wikimedia.org> wrote:
I can understand the rationale behind removing
jQuery.browser:
apparently most developers are too stupid to be trusted with it. Maybe
the idea is to use per-project reimplementation of jQuery.browser as
an intelligence test. The trouble is, I think even the stupidest
developers are able to copy and paste.
Yes, there are legitimate reasons for using browser detection, in
cases where feature detection doesn't work. The Safari segfault is a
good example. In fact, VisualEditor uses browser detection to disable
itself in browsers with broken contentEditable support, because it's
very hard or impossible to feature-detect this. I believe Timo was
working on cleaning up a different UA detection plugin somewhere on
github and using that for VE's browser detection.
tl;dr: browser detection is evil, you should think twice before using
it, but sometimes you have to
Roan