HTML5 Shim vs. Shiv

owlstone picture owlstone · Jan 20, 2013 · Viewed 46.2k times · Source

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]-->

Answer

Norguard picture Norguard · Jan 20, 2013

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".