Widely Available
id: user-agent-sniffing
User agent sniffing
The
navigator.userAgent property and several others loosely identify a browser. Selectively showing content based on the user agent string, also known as user agent sniffing, is unreliable. Consider using feature detection or user agent client hints instead.
Baseline Status:
Achieved Widely Available on Mar 20, 2019 (Cross-browser Newly Available since Sep 20, 2016).
Desktop Browser Engine Support
Google Chrome
4
Supported
Mozilla Firefox
3.5
Supported
Apple Safari
10
Supported
Microsoft Edge
12
Supported
Mobile Browser Engine Support
Chrome Android
18
Firefox Android
4
Safari iOS
10
Specifications and References
MDN Browser Compat Data Keys:
api.Navigator.appCodeName ↗
api.Navigator.appName ↗
api.Navigator.appVersion ↗
api.Navigator.javaEnabled ↗
api.Navigator.platform ↗
api.Navigator.plugins ↗
api.Navigator.product ↗
api.Navigator.productSub ↗
api.Navigator.userAgent ↗
api.Navigator.vendor ↗
api.Navigator.vendorSub ↗
api.WorkerNavigator.appCodeName ↗
api.WorkerNavigator.appName ↗
api.WorkerNavigator.appVersion ↗
api.WorkerNavigator.platform ↗
api.WorkerNavigator.product ↗
api.WorkerNavigator.userAgent ↗