O'Reilly logo

HTML5 Boilerplate Web Development by Divya Manian

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

Finding and using polyfills

Most of HTML5 and CSS3 features have differing levels of support in different browsers, hence, either use JavaScript code to mimic these features in browsers that do not support them or provide an altering view. Such snippets of code are called polyfills.

I help maintain html5please.com which is an opinionated list of polyfills for some popular HTML5 and CSS3 features.

Beware of the performance penalty of using a lot of polyfills on a browser that does not support a lot of features.

When you do use your polyfills, make sure you use Modernizr's load function like we did for the audio polyfill for Sun and Sand Music Festival website in Chapter 4, Adding Interactivity and Completing Your Site. This would prevent unnecessary ...

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