Browser Capability Strategy
Last updated:
Capability strategy focuses on feature support — detect capabilities where possible instead of targeting browsers directly.
01 — Purpose
Features, not browser names
Capability strategy focuses on feature support instead of browser assumptions — detect capabilities where possible instead of targeting browsers directly.
User-agent sniffing breaks quickly and excludes capable browsers while letting broken ones through. Feature detection and progressive enhancement ask: does this environment support what we need — and what happens if it does not?
See progressive enhancement strategy and browser support policy.
02 — Principles
Capability and usability over labels
Support decisions should focus on capability and usability.
- feature detection — test for APIs, not browser strings
- progressive enhancement — baseline works; enhanced path when supported
- resilient fallbacks — readable degradation, not hard blocks
03 — Practice
Good capability strategy
Use @supports, typeof checks, and documented baselines.
- define a browserslist baseline — shared across PostCSS, build, and docs; see browser support policy
- use CSS
@supportsfor progressive layout features — container queries, subgrid - test JS features with guards —
if ('IntersectionObserver' in window) - ship polyfills only when usage data justifies them — not preemptively for every API
- document unsupported behaviour — what users see when a feature is absent
Use Baseline to inform the policy
Baseline distinguishesNewly available features, supported across its core browser set, from Widely available features, which reached that point at least 30 months ago. Limited availability means support is still missing in part of that set. These labels describe interoperability; they do not certify accessibility or coverage of your users' devices and embedded browsers.
Browserslist supports Baseline queries directly. For a project whose audience and support commitments fit this target, a.browserslistrc can contain:
baseline widely availableUse one deliberate target: baseline 2024 selects a fixed year's feature set, while baseline newly availablefollows the latest interoperable features. Multiple query lines are normally combined as a union, not read as alternatives. Reconcile the result with audience analytics, contractual support and real device testing before adopting it.
Checked 4 October 2026: see Baseline with Browserslist for the current queries and tooling. This config informs compatible build tools; it does not automatically polyfill every browser API or turn unsupported CSS into an equivalent accessible experience.
Some CSS platform features force unusual source order. Keep the fallback first, gate enhanced selectors and properties with @supports where practical, and document rule order when it affects behaviour. For examples such as @starting-style, transition-behavior, ::details-content, and customisable selects, see the LSCSS browser support guidance.
04 — Avoid
Browser assumptions
Sniffing and blocking create fragile, exclusionary products.
- browser sniffing — regex on userAgent to enable or disable features
- arbitrary blocking — “please use Chrome” interstitials on capable browsers
- capability assumptions — “everyone has hover” or “mobile never needs keyboard”
- shipping different security or auth paths by sniffed browser
- ignoring
@supportsfallbacks — broken layout in older but supported targets
05 — Close
Test the fallback path
If the enhanced path fails, the baseline must still complete the task.
Disable a feature flag, block an API in DevTools, or test on your browserslist minimum. The product should remain usable — just less polished.
See progressive enhancement strategy, dependency management, and JavaScript standard.