
Capability Detection and the Fallback Ladder
A client-AI feature meets a distribution of devices, not a platform. The WebGPU probe, the WASM rung with its isolation gate, and the five-rung ladder as a testable artifact.
TL;DR: Before a client-side AI feature ships a single megabyte of model weights, it probes the device — WebGPU adapter and limits, WASM tiers, memory signals — and routes the user onto a written degradation ladder: full model on WebGPU, lighter variant, WASM task model, server inference, or feature absent. This article gives you the probe sequence, the deployment gate that surprises teams, and the ladder as a designed, testable artifact.
Why the probe comes first
WebGPU being officially supported across Chrome, Edge, Firefox, and Safari — as web.dev announced on November 25, 2025, with platform conditions attached — is a statement about availability, not uniformity. It is not a Baseline milestone either: as of November 2026, web-features still marks WebGPU as Limited availability, because MDN's compatibility data records Firefox's support as partial and Firefox for Android has none. Underneath the announcement sit real gaps and real variance. As of November 2026, MDN's browser-compat-data lists no Firefox WebGPU support on Linux, Android, or Intel-based Macs, and limits Chromium's Linux support to Intel Gen12+ GPUs; the web.dev post scopes Chrome's Android support to devices running at least Android 12 with Qualcomm/ARM GPUs. iPhones that cannot run iOS 26 cannot participate, since Safari's WebGPU support starts with iOS 26 (Apple's iOS 26 compatibility list starts at iPhone 11 and iPhone SE (2nd generation)). And two devices that both "support WebGPU" can report very different adapter limits: the specification guarantees only a 256 MiB maxBufferSize and lets adapters report more. A shipped inference feature does not meet a platform; it meets a distribution.
The stake is more expensive for AI features than for most progressive enhancement. A CSS feature that is absent degrades in milliseconds and costs nothing. An inference feature that assumes capability can push a multi-hundred-megabyte download to a device that then cannot run the model — the user pays the bandwidth, waits through the progress bar, and receives a failure. That is worse than never offering the feature, and it is entirely preventable: the probe is cheap, and it runs before any weight moves.
One boundary sentence up front: the general argument for feature detection over user-agent sniffing belongs to the web-compatibility literature and is settled. This article applies the settled principle to inference specifically — where the probe is deeper than presence checks, and the fallback is a ladder rather than a single alternative.
Probing WebGPU properly
The presence of a WebGPU object on the page is not capability. The probe is a sequence, and each step can end the conversation. The shape, as of November 2026 — property names and limits are spec-live, so re-verify against MDN's WebGPU documentation when you implement:
async function probeGpu() {
if (!('gpu' in navigator)) return { rung: 'no-webgpu' }
const adapter = await navigator.gpu.requestAdapter()
if (!adapter) return { rung: 'no-webgpu' } // API present, no usable adapter
const { maxBufferSize, maxStorageBufferBindingSize } = adapter.limits
const verdict = {
rung: 'webgpu',
maxBufferSize,
maxStorageBufferBindingSize,
features: [...adapter.features],
}
const device = await adapter.requestDevice().catch(() => null)
if (!device) return { rung: 'no-webgpu' }
device.destroy() // probe only — release before any real allocation
return verdict
}Two branches in that sequence deserve names, because they route differently. Adapter absence — the API exists but no adapter is usable — means the device takes the next rung down, cleanly. Adapter weakness is subtler: an adapter that answers but reports low limits, or one backed by a software renderer, may still carry a smaller model even though the full model would fail to allocate. The buffer and storage-binding limits cap the size of any single GPU buffer and any single storage binding, and they are exactly what converts the selection article's ladder of model variants from theory into routing: which device receives the heavier artifact is decided by measured limits, not hope.
Adapter limits are not the only signal worth reading. Coarse device-memory hints — the Device Memory API where the browser exposes it (as of November 2026, Chromium-based browsers only, in secure contexts; the W3C published the specification as a Discontinued Draft on October 20, 2026) — arrive rounded and deliberately imprecise, but they are honest tie-breakers when the adapter answers ambiguously: a device reporting minimal system memory is a poor candidate for the heavier model variant even if its buffer limits technically clear it. Treat these signals as advisory inputs to rung selection, never as sole gates, and let the memory-budget discipline elsewhere on this topic own what happens after allocation begins.
Operationally, the probe runs once, early, and cheaply — before any download begins — and its verdict is cached for the session. A probe that itself allocates heavily, or that runs on every interaction, has become part of the problem it was meant to prevent.
The WASM rung and its deployment gate
Below WebGPU sits WebAssembly: slower, but near-universal, and the reason the ladder can degrade in speed rather than in existence. For the small task models that are the browser's home turf — embeddings, classifiers, compact speech models — CPU-based WASM inference can be fast enough to ship — measure on your target devices. The rung decision is per-task, and the line to draw is this: a task model on WASM is normal engineering; a chat-shaped LLM on CPU-only WASM needs its speed measured on target devices before it ships.
WASM has capability tiers of its own, and one of them hides a trap outside your JavaScript entirely. SIMD support and threading are separate tiers, and threaded WASM requires the page to be cross-origin isolated, which the HTML Standard ties to two response headers set on the server: Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp or credentialless (MDN adds that the cross-origin-isolated Permissions-Policy must also allow it). Teams get surprised here because the failure lives in deployment configuration, not page code: the same bundle that ran threaded and fast on the staging host can drop to single-threaded on production because a header is missing — ONNX Runtime Web, for example, enables multi-threading only when the browser supports WebAssembly multi-threading and the page is cross-origin isolated. The probe should therefore check crossOriginIsolated alongside SIMD support, and the deployment checklist should treat those two headers as part of the inference feature, not as unrelated server hygiene.
Designing the ladder as an artifact
Everything the probe learns feeds a decision structure that deserves to exist in writing before launch — not as an emergent property of nested if-statements discovered later. The full ladder for a typical feature has five rungs, and the written artifact states, for each: the entry condition the probe must satisfy, and the user-visible behavior at that rung.
| Rung | Entry condition | What the user gets |
|---|---|---|
| Full model on WebGPU | Adapter present, limits clear the full artifact | The complete feature at full quality |
| Lighter variant on WebGPU | Adapter present, limits clear only the smaller build | Same feature, reduced model, honest quality note |
| Task model on WASM | No usable adapter; WASM with acceptable speed | Task-shaped features stay; generation-shaped ones defer |
| Server inference | Client rungs exhausted; network available | The feature via round-trip — with its privacy story disclosed |
| Feature absent | No client capability, no server path warranted | A fully usable page, with the feature quietly or explicitly absent |
Every rung on that ladder is a product decision wearing an engineering costume. The server-fallback rung changes where the user's content travels, which the privacy discipline within this topic treats as a disclosure requirement rather than an implementation detail. The absent rung forces the honest question of whether the page still stands on its own — it must — and whether absence is silent or explained. None of these are answers a probe can supply; the probe only decides who lands where.
The ladder is also testable, and untested rungs rot. Each rung should be forcible in development and CI — an override that pins the probe's verdict — so that the WASM path and the server path are exercised on every meaningful change, not just on the day a real user finally lands there. The rung nobody has run since launch is the rung that breaks; this is the same forced-path discipline that serves any multi-path architecture, applied to capability routing.
What detection cannot decide
A capable device is not a willing one. The probe can establish that this hardware would run the full model; it cannot establish that this user, on a metered connection at 8% battery, should receive a 400 MB download right now. Capability and consent are different questions — the loading discipline owns the download decision and the courtesy gates around it, and the UX treatment owns how the wait and the choice are presented. The probe's verdict is an input to those decisions, never a substitute for them.
Measured capability also drifts under a shipped feature. Browser updates raise limits, enable rungs, and occasionally break them; the device population itself churns. The rung distribution you measured at launch is a snapshot, so teams that run client AI seriously watch that distribution in telemetry and re-read the ladder when it shifts — a ladder whose bottom rungs have quietly emptied can retire complexity, and one whose top rung is shrinking is sending a different warning.
And one decision sits above this article entirely: which browsers and devices the organization supports at all. That is a support-matrix policy conversation — insight-altitude compatibility strategy — and no per-feature probe should be smuggling it in. This article's scope ends at the edges of one feature's ladder, built honestly inside whatever support policy the organization has already set.