7

Are there any checks (or combinations of checks) I can run with Modernizr where:

  • IE6 fails, but higher versions do not fail?
  • IE7 fails, but higher versions do not fail?
  • IE8 fails, but higher versions do not fail?

  • all IEs fail?

  • all browsers fail, but iOS devices do not fail?

  • all browsers fail, but Android devices do not fail?

I want to use Modernizr to check browsers, devices based on feature detection instead of User Agent sniff?

CLOSED - thx, got the message

thx, ez

ezmilhouse
  • 8,933
  • 7
  • 29
  • 38

1 Answers1

7

The whole point in feature detection is to be agnostic of browsers and your application/website should enhance/degrade based on the existence of a feature not the existence of a browser.

The reason we browser detect for MS is because you may need to use CSS workarounds to avid known css display bugs, which is separate from feature detection. For this kind of browser detection checkout HTML5 boiler plate.

Gcoop
  • 3,372
  • 4
  • 26
  • 35
  • 7
    I understand the theory behind feature detection, also appriciate the boilerplate project, but in my all-day worklife I fight against lots of legacy code that would need months of refactoring to meet feature detection standards. so thx for the effort, but there's a little too much 'perfect world' in it :-) thought using modernizr to simulate browser detection would be a nice way introduce feature detection to the system at all. – ezmilhouse Apr 04 '11 at 20:36
  • 9
    @ezmilhouse using feature-detection to achieve browser-detection will just complicate your life, and introduce another point of failure. User-agent strings are designed to identify browsers; if you're stuck with browser detection, at least do the wrong thing right. =) – Dan Davies Brackett Apr 05 '11 at 16:18