Karl Dubost

Encyclopedia Of Broken UserAgent String Detections

Screenshot of “Encyclopedia Of Broken UserAgent String Detections”

Karl shows multiple examples of bad usage of the browsers' User Agent string to try to infer browser type or version identification or supported features.

It's really sad for example to read that Mozilla's WebCompat team (follow also @webcompat) even considers using Safari's User Agent string for Firefox on iOS… 😕

Many people have been warning for so many years about risks of using the User Agent as a proxy for feature identification[1]. Please stop doing it, use feature detection and progressive enhancement!

I'm really hoping User Agent strings will be frozen in all browsers soon.

  1. Karl has been for 10 years at least already… ↩︎

  1. User Agent sniffing is bad, episode 964343.

    If you someone working at @Akamai @akamaidev in charge of the mobile detection for their CDN, please put them in contact with us. Android 12 detection is broken. See github.com/mozilla-mobile/android-components/pull/11649/commits/805637ea2ac6514cb7cc723ead91458d21aacd35#diff-cd4ec44d729d61b8bc60f5ba8b965530152b049318563f2379cb9c678a81ed9dR795-R823