More on Front End Web !

What are Polyfills in Javascript ?

By on Sep 5, 2013 in Javascript, Web | 0 comments

With HTML5 getting popular, a large number of developers have moved on to HTML5 based development. It has indeed helped developers to implement extra features as well as save a lot of time during development too. But one of the most common issues of web development, Cross-Browser compatibility, still exists. Older browsers do not support many of HTML5 related functionality.
As a result, to bridge this gap between HTML5 supporting browsers and older browsers, Polyfills were developed by web developers around the world.

So what exactly is a polyfill?

Lets look at the definition :

A polyfill basically is a browser fallback piece of code which makes the modern browser based functionality available in older browsers too.

This means that HTML5 and CSS3 functionality like “placeholder“, “Canvas”, “video”, “transform” etc can be used even on an old browser. So while developing your web page you just need to code it using the modern functionality and the older browsers will now either have the new functionality available or automatically add a fallback version without you bothering much about it.

Over the time a large number of Polyfills have been developed. You can find varieties of polyfill for a certain functionality on the internet. Though there is a very good list of Polyfills available on GitHub at https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills.

So have fun trying out Polyfills. Do let us know your experience with various polyfills.

 

Post a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">