User agent sniffing
Widely available since 2018-01-29
The navigator.userAgent
read-only property returns the user agent string for the current browser. Selectively showing content based on the user agent string is unreliable. Consider using feature detection instead.
Learning resources on MDN
Browser support
- Chrome 4 Released on 2010-01-25
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 3.5 Released on 2009-06-30
- Firefox for Android 4 Released on 2011-03-29
- Safari 4 Released on 2009-06-08
- Safari on iOS 5 Released on 2011-10-12
Specifications
- HTML Standard (#the-navigator-object), from HTML Workstream (WHATWG).