A More Consistent Future for the Web
Last week at Google I/O 2023, a new initiative was presented: the Web Platform Baseline.
What is it?
It is a multi-company effort from the newly formed Web Developer Experience Group, also known as the WebDX Community Group, that wants to improve the developer experience by providing a unified set of same-to-use features.
Any feature in the Baseline is guaranteed to work without critical bugs in all major browsers’ previous and current versions: Chrome, Edge, Firefox and Safari.
The plan moving forward is to keep it up to date by creating a new version each year to give developers a new safe list of features to target.
Why do we need it?
Until a few years ago, browsers seldom received updates, leaving developers with inconsistent feature support across browsers.
This slow pace of updates required developers to know each browser’s quirks, how to deal with them and either create solutions that only took advantage of the lowest common denominator or code multiple versions according to each browser’s capabilities.
Libraries like jQuery were essential to provide a consistent API, and tools like Modernizr gave developers the information they needed to know what each browser could understand.
Web technologies support has gotten better in the past few years. Gone are the days when browsers didn’t receive updates for years or had vastly different feature support. Now, a new way of developing browsers has become the norm, the so-called evergreen browsers. As continuous delivery has grown in adoption in the software industry, browsers have started to release new versions more often, even with a predefined cadence and multiple channels, to test newer features before they reach the stable channel.
We went from having browsers hardly ever-changing to constantly changing, each with a different focus on what to support first. This improved what can be done natively within a website but increased the burden on the developers to keep up with which features are available in each browser.
The Baseline will give teams a target to use and develop against and allow them to create a compelling experience knowing that up-to-date browsers will support all the features from a Baseline.
From MDN’s Baseline page:
Baseline identifies widely-supported web platform features. Web developers can expect Baseline features to work in contemporary browsers.
A Baseline feature - such as an API, a set of CSS properties, or a JavaScript syntax - is known to work consistently in the current and previous major versions of several well-known browsers (Chrome, Edge, Firefox, and Safari).
How to use them
Baseline adherence for each feature can be found on all MDN web pages. Here is an example of what a safe-to-use feature looks like:
WebDX created a handy npm package called web-features to check feature support via JavaScript.
Where to go to know more
To keep up to date with what the WebDX will do, follow their official website.
How to get involved
There are a few ways to get involved:
- Help the open web docs project by improving the MDN Web Docs contribution, sponsoring the project or talking about it at events or social media.
- Help keeping the web-features npm package up-to-date via providing feedback or creating a PR at: https://github.com/web-platform-dx/feature-set/issues
Conclusion
The Baseline is a significant step towards a more consistent and predictable web development environment. It will help developers, companies and customers streamline which features to rely on while ideating and building for the web. Showing your support and helping spread the use and contribution to the project is the best way to see it succeed.