Advice to "never" use browser detection is good advice, but in my
experience it's simply impossible to follow. The bad behaviors of old
IE browsers - behaviors that are, in effect, bugs, and therefore not
"features" that obey any particular logic - are numerous and
pervasive.  Facile advice like "avoid troublesome features"
constitutes a grim curse on site design: "don't do anything that
doesn't work reliably in IE6" is what that amounts to, and I think
that's terrible.

Feature/behavior detection is definitely better than raw browser
sniffing, but (jQuery being a good example) any feature/behavior
detection system I've seen is limited to detecting what it's been made
to detect. For example: in IE6 and IE7, an absolutely-positioned block
with explicit "edge" style attributes ("top", "left", etc) is not
given a computed width.  That means that nested blocks can't use
"width: 50%" because there's nothing against which that "50%" can be
computed. For some layouts that's a very serious problem, and there's
nothing I can do with jQuery to detect that in the case that it
affects what my site code needs to do.  Here's another one: a click on
a button inside an anchor tag doesn't trigger the anchor's click
handler (in IE7).  I'm not sure how jQuery would handle that even if
it wanted to.



-- 
Turtle, turtle, on the ground,
Pink and shiny, turn around.

Reply via email to