O'Reilly logo

HTML5 Multimedia Development Cookbook by Lee Jordan, Dale Cruse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing browser support

Let's start by using the open source Modernizr project at: http://modernizr.com created by developers Faruk Ates and Paul Irish. According to the website, Modernizr uses feature detection to test the current browser against upcoming features.

Tip

The Modernizr concept aims at feature detection instead of browser detection. It is a subtle but important differentiation. Instead of making broad assumptions, the Modernizr approach detects features that browsers support.

Testing browser support

How to do it...

Download the Modernizr JavaScript file and reference it in the head section of your markup. You will then add the class of "no-js" to your body

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required