liveBook · Manning

Baseline

As explained in Vanilla Web

A WebDX initiative that reports when web platform features reach specified levels of availability across major browsers.

Before relying on a Web API, check whether it works across the browsers your users run. Baseline is a WebDX Community Group initiative that reports cross-browser availability for web platform features. It helps distinguish an API supported across major browsers from one that still needs feature detection, a fallback, or progressive enhancement. section 2.2.1

Baseline uses two availability statuses:

  • Newly available means a feature works in the latest stable Chrome, Edge, Firefox, and Safari. Older browser versions may still lack it. section 2.2.1
  • Widely available means it has remained Newly available across those browsers for 30 months. It can then be relied on for the vast majority of traffic without fallbacks. section 2.2.1
  • A label such as Baseline 2024 identifies features that became Newly available during 2024, not features that became Widely available that year. section 2.2.1

Use Baseline alongside MDN Web Docs and CanIUse when choosing APIs. Availability is not the only condition for success: some browser APIs require HTTPS or localhost, and an unavailable API still calls for a deliberate fallback or graceful degradation. section 2.2.1 section 6.3

if ('permissions' in navigator) {
   navigator.permissions.query({name: "geolocation"})
        .then(console.log);
}

This Permissions API check shows feature detection in practice: the query runs only when `navigator.permissions` exists. It does not replace checking whether the API suits the browsers and conditions your application supports. section 2.2.1

How Vanilla Web covers it

How deep it goes
Defines two availability statuses, their browser and time thresholds, and yearly labels, but does not detail how compatibility data is collected.
Examples
Shows a Permissions API availability check using `navigator.permissions` and explains what a label such as Baseline 2024 means.
What it assumes
Assumes basic familiarity with browser APIs while illustrating feature detection with a short `navigator` check.
What you can do after
Evaluate/understand it to judge when a Web API has cross-browser support and when older browsers may still need a fallback.
How it connects
Connects browser compatibility to feature detection, progressive enhancement, Web APIs, MDN Web Docs, and CanIUse.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vanilla Web. The section links point to the parts of the book it draws on.