What is the difference between a shim and a polyfill? In the JavaScript world, one frequently encounters the words shim and polyfill. What are those things and what is the difference between them? Shim. A shim is a library that brings a new API to an older environment, using only the means of that environment. Polyfill. In October 2010, Remy Sharp blogged about the term “polyfill” [via Rick Waldro