seniorHTML5

How does 'Feature Detection' differ from 'User Agent Sniffing'?

Updated Apr 28, 2026

Short answer

Feature detection checks for specific capabilities; UA sniffing checks the browser name.

Deep explanation

UA sniffing is brittle because browser strings can be forged or changed. Feature detection (using JS or @supports in CSS) verifies if the actual functionality exists, which is the gold standard for progressive enhancement.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More HTML5 interview questions

View all →