I see that some sites include a file called html5.js, for what purpose do they include this?
Something like this:
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
I see that some sites include a file called html5.js, for what purpose do they include this?
Something like this:
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
This statement ensures that only browsers that are from IE8 down ( source here ) load this file .js
.
Shim , according to Google, is
A washer or thin strip of material used to align parts, make them fit, or reduce wear.
The part that matters is make them fit , meaning "dock." HTMl5shim serves for older browsers to understand some new HTML5 tags that did not exist at the time they were deployed, such as <article>
and <section>
. Read more about it here .