Why include Html5.js file

Asked

Viewed 168 times

0

I see that some sites include a file called Html5.js, for what purpose they include this?

Something like that:

<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->

1 answer

2

This instruction ensures that only browsers that are IE8 down (source here) upload this file .js.

Shim, according to Google, it is

a Washer or thin strip of material used to align Parts, make them fit, or reduce Wear.

The important part is make them fit, I mean, "make it fit". Html5shim is for older browsers to understand some new HTML5 tags, which did not exist at the time they were implemented, such as <article> and <section>. Read more about it here.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.