Polyfill.io

Features and browsers supported

We test browser support with a test suite for each feature. A browser is considered compliant only if it passes all the tests, so this is a reasonably comprehensive test rather than a naive feature-detect. To view the test suite for a feature in the browser you're using right now, click the Tests link in the feature list. The results below are generated using browsers hosted by Sauce Labs.

Feature list

Key: Feature missing, Feature supported with Polyfill service, Feature supported natively, Included by default

IE Firefox Chrome Safari Your browser

Array.from

  • 0.9KB
78910111213 203033414244 303540424648 5.189

Array.isArray

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Array.of

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.@@iterator

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Array.prototype.contains

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Array.prototype.entries

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Array.prototype.every

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Array.prototype.fill

  • 0.5KB
78910111213 203033414244 303540424648 5.189

Array.prototype.filter

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.find

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.findIndex

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.forEach

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Array.prototype.includes

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Array.prototype.indexOf

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Array.prototype.keys

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Array.prototype.lastIndexOf

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Array.prototype.map

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.reduce

  • 0.5KB
78910111213 203033414244 303540424648 5.189

Array.prototype.reduceRight

  • 0.5KB
78910111213 203033414244 303540424648 5.189

Array.prototype.some

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Array.prototype.values

  • 0.1KB
78910111213 203033414244 303540424648 5.189

AudioContext

  • 0.9KB
78910111213 203033414244 303540424648 5.189

CustomEvent

  • 0.5KB
78910111213 203033414244 303540424648 5.189

DOMTokenList

  • 0.3KB
78910111213 203033414244 303540424648 5.189

DOMTokenList.prototype.@@iterator

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Date.now

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Date.prototype.toISOString

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Document

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Element

  • 1.3KB
78910111213 203033414244 303540424648 5.189

Element.prototype.after

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Element.prototype.append

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Element.prototype.before

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Element.prototype.classList

  • 1.0KB
78910111213 203033414244 303540424648 5.189

Element.prototype.cloneNode

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Element.prototype.closest

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Element.prototype.matches

  • 0.3KB
78910111213 203033414244 303540424648 5.189

Element.prototype.placeholder

  • 1.3KB
78910111213 203033414244 303540424648 5.189

Element.prototype.prepend

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Element.prototype.remove

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Element.prototype.replaceWith

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Event

  • 3.0KB
78910111213 203033414244 303540424648 5.189
  • Where necessary, also adds the EventTarget methods addEventListener, removeEventListener and dispatchEvent.

Event.DOMContentLoaded

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Event.focusin

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Event.hashchange

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Function.prototype.bind

  • 1.0KB
78910111213 203033414244 303540424648 5.189

HTMLDocument

  • 0.1KB
78910111213 203033414244 303540424648 5.189

HTMLPictureElement

  • 16.9KB
78910111213 203033414244 303540424648 5.189

IntersectionObserver

  • 6.2KB
78910111213 203033414244 303540424648 5.189

Intl

  • 33.9KB
78910111213 203033414244 303540424648 5.189
  • Locales must be specified separately by prefixing the locale name with Intl.~locale, eg Intl.~locale.en-GB.

JSON

  • 3.9KB
78910111213 203033414244 303540424648 5.189

Map

  • 1.7KB
78910111213 203033414244 303540424648 5.189
  • For compatibility with very old engines, Map.prototype.delete must be accessed using square bracket notation because 'delete' is a reserved word. myMap.delete() is an error in IE8. Use myMap['delete']() instead.

  • The test suite for this polyfill is derived from work of Andrea Giammarchi which is published under an MIT licence

Math.acosh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.asinh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.atanh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.cbrt

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.clz32

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.cosh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.expm1

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.hypot

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.imul

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.log10

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.log1p

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.log2

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.sign

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.sinh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.tanh

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Math.trunc

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Node.prototype.contains

  • 0.3KB
78910111213 203033414244 303540424648 5.189

NodeList.prototype.@@iterator

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Number.isNaN

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Object.assign

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Object.create

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Object.defineProperties

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Object.defineProperty

  • 1.1KB
78910111213 203033414244 303540424648 5.189
  • In browsers that have no hooks to define getter functions (notably IE <= 8), attempting to defineProperty with a getter or setter function will fail. Since failing silently would likely break your application, we throw an exception. In IE8, this can be hard to diagnose because the console will just say 'Exception thrown and not caught'

Object.getOwnPropertyDescriptor

  • 1.0KB
78910111213 203033414244 303540424648 5.189

Object.getOwnPropertyNames

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Object.getPrototypeOf

  • 0.2KB
78910111213 203033414244 303540424648 5.189

Object.is

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Object.keys

  • 0.5KB
78910111213 203033414244 303540424648 5.189

Object.setPrototypeOf

  • 0.7KB
78910111213 203033414244 303540424648 5.189

Promise

  • 4.4KB
78910111213 203033414244 303540424648 5.189
  • In IE8, the catch method cannot be invoked directly since it is a reserved word. Instead, use ["catch"] if intend to run your code in IE8

Set

  • 1.4KB
78910111213 203033414244 303540424648 5.189
  • For compatibility with very old engines, Set.prototype.delete must be accessed using square bracket notation because 'delete' is a reserved word. mySet.delete() is an error in IE8. Use mySet['delete']() instead.

  • The test suite for this polyfill is derived from work of Andrea Giammarchi which is published under an MIT licence

String.prototype.contains

  • 0.1KB
78910111213 203033414244 303540424648 5.189

String.prototype.endsWith

  • 0.1KB
78910111213 203033414244 303540424648 5.189

String.prototype.includes

  • 0.2KB
78910111213 203033414244 303540424648 5.189

String.prototype.repeat

  • 0.3KB
78910111213 203033414244 303540424648 5.189

String.prototype.startsWith

  • 0.1KB
78910111213 203033414244 303540424648 5.189

String.prototype.trim

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol

  • 2.5KB
78910111213 203033414244 303540424648 5.189

Symbol.hasInstance

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.isConcatSpreadable

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.iterator

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.match

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.replace

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.species

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.split

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.toPrimitive

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.toStringTag

  • 0.1KB
78910111213 203033414244 303540424648 5.189

Symbol.unscopables

  • 0.1KB
78910111213 203033414244 303540424648 5.189

URL

  • 3.8KB
78910111213 203033414244 303540424648 5.189
  • searchParams is not iterable and has no forEach(), entries(), keys(), values() methods

  • Polyfill requires Object getters so fails in IE < 8

UserTiming

  • 5.0KB
78910111213 203033414244 303540424648 5.189

WeakMap

  • 0.7KB
78910111213 203033414244 303540424648 5.189

WeakSet

  • 0.4KB
78910111213 203033414244 303540424648 5.189

Window

  • 0.1KB
78910111213 203033414244 303540424648 5.189

XMLHttpRequest

  • 1.1KB
78910111213 203033414244 303540424648 5.189

atob

  • 0.8KB
78910111213 203033414244 303540424648 5.189

console

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.assert

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.clear

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.count

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.debug

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.dir

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.dirxml

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.error

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.exception

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.group

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.groupCollapsed

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.groupEnd

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.info

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.log

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.markTimeline

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.table

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.time

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.timeEnd

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.timeStamp

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.timeline

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.timelineEnd

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.trace

  • 0.1KB
78910111213 203033414244 303540424648 5.189

console.warn

  • 0.1KB
78910111213 203033414244 303540424648 5.189

devicePixelRatio

  • 0.1KB
78910111213 203033414244 303540424648 5.189
  • This polyfill just sets devicePixelRatio to 1 without attempting to measure it.

  • Older versions of Firefox are known to incorrectly alter the DPR on user zoom, but we don't (currently) correct for this

document.getElementsByClassName

  • 0.1KB
78910111213 203033414244 303540424648 5.189

document.head

  • 0.1KB
78910111213 203033414244 303540424648 5.189

document.querySelector

  • 0.7KB
78910111213 203033414244 303540424648 5.189

document.visibilityState

  • 0.3KB
78910111213 203033414244 303540424648 5.189
  • The alias PageVisibility works for this feature for backwards compatibility with the name under which it was previously (erroneously) available

fetch

  • 5.6KB
78910111213 203033414244 303540424648 5.189
  • Makes use of FormData, FileReader and Blob if they exist

getComputedStyle

  • 1.9KB
78910111213 203033414244 303540424648 5.189

localStorage

  • 1.1KB
78910111213 203033414244 303540424648 5.189

location.origin

  • 0.3KB
78910111213 203033414244 303540424648 5.189

matchMedia

  • 1.4KB
78910111213 203033414244 303540424648 5.189

performance.now

  • 0.1KB
78910111213 203033414244 303540424648 5.189

requestAnimationFrame

  • 0.7KB
78910111213 203033414244 303540424648 5.189

screen.orientation

  • 0.9KB
78910111213 203033414244 303540424648 5.189
  • In IE <= 8 window.screen is read-only, so the orientation property is not definable

setImmediate

  • 1.6KB
78910111213 203033414244 303540424648 5.189

~html5-elements

  • 2.6KB
78910111213 203033414244 303540424648 5.189

~viewport

  • 0.7KB
78910111213 203033414244 303540424648 5.189

Bundle sizes

The table above lists a data size for each polyfill, which is the size of the polyfill including a feature detect, after minification, and before gzip. Two very important things to remember about these sizes are:

  • Gzip gets more effective the larger the data is, so the more polyfills you include in the bundle you request, the smaller each individual polyfill is likely to be, once the bundle is gzipped.
  • Some polyfills have multiple variants. In these cases, the size of the largest variant is shown.

The following table shows the total size of the polyfill bundle for the default set, in all our test browsers:

BrowserVersionSize (raw)Size (min)Size (gzip)
chrome3043.9KB20.1KB6.9KB
chrome3531.7KB13.4KB4.3KB
chrome4018.1KB7.7KB2.7KB
chrome4216.9KB7.1KB2.5KB
chrome4611.7KB5.2KB1.8KB
chrome4811.7KB5.2KB1.8KB
firefox2045.5KB21.0KB7.1KB
firefox309.2KB3.9KB1.4KB
firefox335.6KB2.5KB0.9KB
firefox414.1KB1.8KB0.6KB
firefox424.1KB1.8KB0.6KB
firefox444.1KB1.8KB0.6KB
ie783.5KB35.8KB11.2KB
ie897.0KB42.6KB13.3KB
ie962.5KB30.6KB10.3KB
ie1047.8KB23.8KB7.9KB
ie1147.2KB23.4KB7.9KB
ie1224.4KB13.2KB4.9KB
ie1319.7KB8.8KB3.0KB
safari817.9KB7.5KB2.6KB
safari914.4KB6.2KB2.1KB
safari5.162.9KB27.0KB8.9KB
android4.433.6KB15.2KB5.5KB
android4.334.0KB15.4KB5.5KB
android4.234.0KB15.4KB5.5KB
android4.134.0KB15.4KB5.5KB
ios_saf9.15.4KB2.3KB0.8KB
ios_saf9.25.0KB2.1KB0.8KB

Default sets

The alias default includes a set of polyfills that comprise features with high demands, small polyfill sizes, good performance and at least one good native implementation in a stable browser. The set evolves over time to include new features as they become a more stable part of the web platform.

Although you cannot request an immutable version of a polyfill, you can reduce the risk of future releases of the polyfill service breaking compatibility with your code by using an immutable default set. Each time we make a release, if we have changed the features included in the default set we will issue a new immutable alias for the set, which won't change when the default set changes again. The components of these sets are shown below:

AliasConstituents
default-3.3Array.isArray, Array.prototype.every, Array.prototype.filter, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.lastIndexOf, Array.prototype.map, Array.prototype.reduce, Array.prototype.reduceRight, Array.prototype.some, atob, CustomEvent, Date.now, Date.prototype.toISOString, Document, document.querySelector, document.visibilityState, DOMTokenList, Element, Element.prototype.classList, Element.prototype.cloneNode, Element.prototype.closest, Element.prototype.matches, Event, Event.DOMContentLoaded, Event.focusin, Event.hashchange, Function.prototype.bind, JSON, Object.assign, Object.create, Object.defineProperties, Object.defineProperty, Object.getOwnPropertyNames, Object.getPrototypeOf, Object.keys, requestAnimationFrame, String.prototype.includes, String.prototype.trim, Window, XMLHttpRequest, ~html5-elements
default-3.4Added Array.from, Array.of, Array.prototype.fill, Element.prototype.after, Element.prototype.append, Element.prototype.before, Element.prototype.prepend, Element.prototype.remove, Element.prototype.replaceWith, Node.prototype.contains, Number.isNaN, Promise, String.prototype.endsWith, String.prototype.startsWith, URL, location.origin
default-3.5Added Object.getOwnPropertyDescriptor
default-3.6Added Map, Set