Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Shim vs. Shiv

Beginner at Rails.

I'm coding CSS in my sample application. I understand there is Javascript code to help browsers, i.e. Internet Explorer, support HTML5.

What is the difference between HTML5 Shim and HTML5 Shiv? Is it something worth knowing?

http://html5shim.googlecode.com/svn/trunk/html5.js

http://html5shiv.googlecode.com/svn/trunk/html5.js

My code, y'all:

<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"> </script> <![endif]--> 
like image 404
owlstone Avatar asked Jan 20 '13 20:01

owlstone


People also ask

What is the HTML 5 shim code for?

The shim is to enable HTML5 elements to be able to be styled through CSS in Internet Explorer versions less than 9.

What is a shim HTML?

A shim is a piece of code used to correct the behavior of code that already exists, usually by adding new API that works around the problem. This differs from a polyfill, which implements a new API that is not supported by the stock browser as shipped.


1 Answers

It was originally called the html5-shiv.

Shiv really isn't the right term, as a shiv is a stabbing-implement.

A shim is something which you use to level things out (or prop them up). If a table has one leg that's too short, you might shim it with a piece of wood or a phone book...

So html5-shim is for people who expect html5shiv to be called a shim.

That's entirely it, as far as differences go.

Kind of like polyfills cover over the differences in implementations of features.
In North America, Polyfill might be called "Spackle".

like image 79
Norguard Avatar answered Sep 24 '22 17:09

Norguard