HTML5 Shim vs. Shiv
Beginner at Rails.
What is the difference between HTML5 Shim and HTML5 Shiv? Is it something worth knowing?
My code, y'all:
<!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"> </script> <![endif]-->
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".
shiv or shim?
Common question: what's the difference between the html5shim and the html5shiv? Answer: nothing, one has an m and one has a v - that's it.
The answer is.
The term shiv originates from John Resig, who was thought to have used the word for its slang meaning, a sharp object used as a knife-like weapon, intended for Internet Explorer. Truth be known, John probably intended to use the word shim, which in computing means an application compatibility workaround. Rather than correct his mispelling, most developers familiar with Internet Explorer appreciated the visual imagery. And that, kids, is etymology.
From author's page at https://github.com/aFarkas/html5shiv
This is probably more simple than you're looking for, but for others who may be confused:
First, here's a non-programming definition of a Shim:
noun: a washer or thin strip of material used to align parts, make them fit, or reduce wear.
verb: wedge (something) or fill up (a space) with a shim.
To understand a shim in programming terms, you need to understand what a pain IE was/is for web developers:
So, in order to keep sites and applications working in IE, as standards were produced, IE could not or (for monopolistic reasons) would not update IE (here's a great post with more info about that). This caused a rift between IE and other browsers that grew over time. This rift often surfaced in unexpected errors, styling differences, and some applications straight-up refused their users the option of running it from other browsers.
For instance, when jQuery was first released, a major advantage it had over its predecessors - or just writing your own library - was that it worked in every Browser, even IE. At the time IE was still heavily used, so this saved developers a lot of time. But now jQuery is on version 3. And the major difference between previous versions is that it no longer supports IE. That's because everyone, even Microsoft has sorta moved away from IE (Win10's default browser is Edge). But, unfortunately many sites and web applications were designed specifically for IE (for security reasons). And even though IE has gone the way of the Dodo for most commercial applications, it still offers security features that other browsers don't (but they're catching up quickly). And even if they did, the cost of updating these applications is often too great to be justifiable.
And that basically means many people still are forced to use IE, so these shims are still necessary.