https://github.com/mdn/browser-compat-data
This repository contains compatibility data for Web technologies. Browser compatibility data describes which platforms (where "platforms" are usually, but not always, web browsers) support particular Web APIs.
This data can be used in documentation, to build compatibility tables listing browser support for APIs. For example: Browser support for WebExtension APIs.
Maintained by the MDN team at Mozilla.
You can install mdn-browser-compat-data as a node package.
npm install mdn-browser-compat-data
const bcd = require('mdn-browser-compat-data');
bcd.css.properties.background;
// returns a compat data object (see schema)
There's a top-level directory for each broad area covered: for example, "http", "javascript", "webextensions". Inside each of these directories is one or more JSON file containing the compatibility data.
Please note that we have not (yet) migrated all compatibility data from the MDN wiki pages into this repository.
-
css/ contains data for CSS properties, selectors, and at-rules.
-
html/ contains data for HTML elements, attributes, and global attributes.
-
http/ contains data for HTTP headers, statuses, and methods.
-
javascript/ contains data for JavaScript built-in Objects, statement, operators, and other ECMAScript language features.
-
mathml/ contains data for MathML elements, attributes, and global attributes.
-
svg/ contains data for SVG elements, attributes, and global attributes.
-
webdriver/ contains data for WebDriver commands.
-
webextensions/ contains data for WebExtensions JavaScript APIs and manifest keys.
-
xslt/ contains data for XSLT elements, attributes, and global attributes.
The definitive description of the format used to represent compatibility data is the schema file. You can also have a look at the schema documentation.
Please note that we do not (yet) guarantee the stability of the data format. You're welcome to use the data, but its structure is subject to change without notice.
If you find a problem, please file a bug.
We're very happy to accept contributions to this data. Please familiarize yourself with the schema and send us a pull request. See also the Contributing file for more information.
It takes 1-2 weeks for changes in this data to be reflected in MDN's browser compatibility tables. The process is:
- A pull request is reviewed and merged to master.
- A new release of mdn-browser-compat-data is created by MDN staff. This happens every 4-14 days.
- A new image of Kumascript, which includes the BCD release, is built and deployed to production. This happens within a day of the npm package release.
- The MDN page using the data is regenerated. For newly converted pages, a staff member switches to the {{Compat}} macro, and re-checks the conversion. For updates to converted pages, a logged-in MDN user force-refreshes the page to regenerate it.
Here are some projects using the data, as an npm module or directly:
- Add-ons Linter - the Add-ons Linter is used on addons.mozilla.org and the web-ext tool. It uses browser-compat-data to check that the Firefox version that the add-on lists support for does in fact support the APIs used by the add-on.
- Browser Compatibility Data Explorer - View, search, and visualize data from the compatibility dataset.
- Compat Report - Firefox Add-on that shows compatibility data for the current site in the developer tools.
- compat-tester - Scan local documents for compatibility issues.
- Visual Studio Code - Shows the compatibility information in the code completion popup.
- webhint.io - Hints to check if your CSS HTML and JavaScript have deprecated or not broadly supported features.