explaingit

fyrd/caniuse

5,835JSONAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

The raw JSON data behind caniuse.com, a lookup table of which browsers support which HTML, CSS, and JavaScript features, used both by contributors fixing errors and by build tools that add compatibility code automatically.

Mindmap

mindmap
  root((caniuse data))
    Content
      Browser support tables
      HTML CSS JS features
    Format
      JSON data files
      Legacy format
    Use Cases
      Build tool integration
      Compatibility checks
    Community
      Open contributions
      Pull requests
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Check browser support for a specific CSS property, HTML element, or JavaScript API by querying the JSON data directly.

USE CASE 2

Power a build tool like Autoprefixer or Browserslist with up-to-date browser compatibility data.

USE CASE 3

Contribute corrections or additions to browser support tables by submitting a pull request.

USE CASE 4

Build your own browser compatibility checker or widget on top of the raw support data.

Tech stack

JSON

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you credit caniuse.com as the source (Creative Commons Attribution 4.0).

In plain English

This repository is the raw data source behind caniuse.com, a reference site that web developers use to look up which browsers support which features. When a developer wants to know whether a CSS property, HTML element, or JavaScript API works in Chrome, Firefox, Safari, or older versions of Internet Explorer, caniuse.com is often where they check. This repo is where that data actually lives. The data is stored in JSON format, a plain text structure that programs can easily read. The main file is fulldata-json/data-2.0.json, which contains the full support table for every feature tracked on the site. There is also a data.json file kept for older projects that depended on an earlier format. The repository serves two main purposes. First, it lets anyone contribute corrections or additions to the support data by submitting changes directly through GitHub. If a browser version is missing from the table, or if a feature has been added or its support status has changed, contributors can open a pull request. Second, it gives other software projects access to the underlying data so they can build their own tools on top of it, such as build tools that automatically add compatibility code for older browsers based on which features they lack. The data is licensed under Creative Commons Attribution 4.0, meaning anyone can use it for any purpose as long as they credit caniuse.com as the source. Some entries on the website draw from a separate MDN project called browser-compat-data rather than this repository. The project is created and maintained by Alexis Deveria.

Copy-paste prompts

Prompt 1
I want to use the caniuse data JSON to check whether CSS grid is supported in Safari 15. Show me how to load and query the data-2.0.json file to find the answer.
Prompt 2
I'm building a PostCSS plugin that adds vendor prefixes based on browser support. How do I integrate the fyrd/caniuse JSON data into my build pipeline to decide which prefixes to add?
Prompt 3
I noticed the caniuse browser support data for a specific feature and browser version is incorrect. Walk me through making the correction and submitting a pull request to fyrd/caniuse.
Prompt 4
Show me how to use the caniuse data in a Node.js script to print all features that are not supported in Internet Explorer 11.
Open on GitHub → Explain another repo

← fyrd on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.