Polyfills

October 8, 2010 at 1:31 pm in CSS3, HTML5

Well, it seems I’m a little late to the party – Remy Sharp has beaten me to the punch and posted a great post explaining the sudden popularity of polyfills. You should read that too.

Over the last few days, people have been talking about “polyfills.” According to Paul Irish, a polyfill is

A shim that mimics a future API providing fallback functionality to older browsers.

Throughout the book, we discuss many different polyfills, even creating our own at times. As more developers implement more of the interesting HTML5 and CSS3 features, more interesting polyfills are emerging.

One of the most well-known polyfills is Remy Sharp’s html5shim which lets us use the new sectional markup in our pages in browsers like IE 8 and earlier. Others like Socket.IO go beyond simple polyfills and provide both server and client-side fallbacks for Web Sockets.

The Modernizr wiki has a huge list of various shims and polyfills you can use in your work.

Creating usable fallback solutions is the only way we can use these new APIs and features on our sites today. HTML5 and CSS3 provides a fallback solution for almost every topic covered.

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *