Menu

Your Browser Can Tell You What It Can Do — Ask It Before You Build (Zero Backend)
📰

Your Browser Can Tell You What It Can Do — Ask It Before You Build (Zero Backend)

DEV Community: serverless·Programming Central·9 days ago
#wid2yQR2
#devtoserverless#devto#dev#probe#browser
Long article (2092 words) — no AI summary yet.
Reading 0:00
15s threshold

A small program asks the browser what it supports, why "I don't know" is not "no", and the TypeScript that keeps the two apart.

A user reports that the video editor does not work in their browser. Someone on the team says Safari does not support WebCodecs — the browser's built-in API for decoding and encoding video — and the bug is closed as "not our problem". A week later the same build works in Safari on another machine, and nobody knows why. The guess was not a measurement; it was a memory of a browser from three versions ago.

The browser does not expose a brand, it exposes features. It can answer, at runtime, whether it has a codec, a background thread, a storage API, a compression stream, a GPU. The answer has four values, not two: present, absent, blocked, and unknown. Treating the last one as absent is how a product refuses a browser it could have supported, and how a support team promises a feature it never checked.

This article runs the program that shows the difference.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.