What’s New in Chrome 94? Exploring WebGPU, WebCodecs, and More
Chrome 94, released on September 21, 2021, introduces 13 new features—including the groundbreaking WebGPU API, WebCodecs, prioritized scheduler.postTask, Idle Detection API, JS Self‑Profiling API, Canvas color management, and early hints—each detailed with usage examples, performance insights, and their impact on modern web development.
Chrome 94 Overview
Chrome 94 was officially released on 2021‑09‑21 and brings 13 new features that advance web capabilities, most notably the WebGPU API which enables direct GPU access for 3D rendering and data‑parallel computation, opening new possibilities for games and AI on the web.
WebGPU
WebGPU is introduced as an origin‑trial feature in Chrome 94 and is expected to become a W3C standard after broader browser support. It provides low‑level GPU access, offering superior performance over WebGL for both graphics and compute workloads such as machine learning.
The performance advantage is illustrated by the following comparison (Safari):
TensorFlow.js tests also show a performance boost with WebGPU, though the gap with WebGL is modest:
WebGPU is built on native GPU APIs such as DirectX 12, Metal, and Vulkan:
A vector‑multiplication example using WebGPU runs over 200 lines of code and demonstrates far superior scaling compared to CPU:
WebCodecs
WebCodecs becomes a stable feature in Chrome 94, exposing hardware‑accelerated image, audio, and video encoding/decoding APIs to web developers. The proposal is a joint effort by engineers from Google, Mozilla, and Microsoft and is expected to become a W3C standard.
Google Docs migrated to a Canvas‑based rendering pipeline that uses the ImageDecoder from WebCodecs to decode GIFs, improving performance and simplifying code.
Prioritized scheduler.postTask
Chrome 94 ships the Scheduling APIs proposal, adding scheduler.postTask with three priority levels (user‑blocking, user‑visible, background) and a TaskController for dynamic priority changes and cancellation.
Airbnb engineers used this API to split long tasks, pre‑download images, and reduce Total Blocking Time from 16 s to 6 s on their search results page.
Example of a blocking infinite loop (for demonstration only): while (true) { console.log("hello, Chrome!"); } Illustration of the performance gains from the postTask scheduler:
Idle Detection API
The Idle Detection API, now stable in Chrome 94, lets pages query whether the user is idle based on keyboard, mouse, or touch activity. It requires explicit user permission and is currently only supported by Chrome; Firefox and Safari oppose it on privacy grounds.
// Request permission for Idle Detection API
const state = await IdleDetector.requestPermission();
if (state !== "granted") {
console.log("Idle detection permission not granted.");
}JS Self‑Profiling API
This API provides detailed JavaScript execution performance data. It is supported in Chrome but rejected by Safari due to potential timing‑attack concerns.
Canvas Color Management
Chrome 94 adds support for the Display‑P3 color space in 2D canvas contexts, improving color fidelity for images, video, and design work.
canvas.getContext('2d', { colorSpace: "display-p3" });Display‑P3 covers a 25 % larger gamut than sRGB, as shown below:
103 Early Hints for Navigation
Chrome 94 introduces the IETF RFC 8297 “103 Early Hints” as an origin‑trial feature. Early Hints allow servers to send preload information before the full response, reducing overall latency.
Typical request/response flow with Early Hints:
GET / HTTP/1.1
Host: example.com HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script HTTP/1.1 200 OK
Date: Fri, 26 May 2017 10:02:11 GMT
Content-Type: text/html; charset=utf-8
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script
<!doctype html>
[...]Diagrams of the three navigation scenarios illustrate how Early Hints can dramatically speed up resource loading.
Summary
Starting with Chrome 94, Google shortens its release cycle from six to four weeks, delivering new web platform capabilities faster but also increasing pressure on developers. The browser continues to push open‑web standards—WebGPU, WebCodecs, Scheduler APIs, and more—while occasionally advancing features ahead of broader industry consensus.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
