terminologynamingvocabularypolyfillsshim

What is the difference between a shim and a polyfill?


Both seem to be used in web development circles, see e.g. HTML5 Cross Browser Polyfills, which says:

So here we're collecting all the shims, fallbacks, and polyfills...

Or, there's the es5-shim project.

In my current project we're using a number of these, and I want to stick them all in the same directory. So, what should I call this directory---shims, or polyfills?


Solution

  • Answering your specific question, call your directory shims if you want to keep the directory generic.