JavaScript library for detecting browsers and platforms using feature testing.
-
Accurate: it doesn't rely on the User-Agent string like other libraries [1] [2].
-
Solid: it's tested against a large dataset of Browser Object Model (BOM).
To add Paguro's Browser Detection library to your project:
$ npm add @wig12/browser-detection
import BrowserDetection from '@wig12/browser-detection'; // ES6
const detectedBrowser = BrowserDetection();
console.log(detectedBrowser);
/* -- Output
{
browser: 'Firefox',
browserVersion: 67,
layout: 'Gecko',
layoutVersion: 67,
os: 'Windows',
osVersion: 95
}
*/
Browser | Detectable versions |
---|---|
Internet Explorer | 11 |
Edge | 44 / 80 & 120 |
Chrome | 40 / 80 & 120 |
Chromium | 40 / 80 |
Firefox | 42 / 74 & 117 / 120 |
Safari | 8 / 13 |
Opera | 66 |
Brave | 1.3 |
Browser | Latest version |
---|---|
Trident | - |
EdgeHTML | - |
Gecko | - |
WebKit | - |
Blink | - |
KHTML | - |
Presto | - |
Browser | Latest version |
---|---|
OS X | - |
Windows | - |
Linux | - |
Unix | - |
Solaris | - |
iOS | - |
Android | - |
- The fields
layoutVersion
andosVersion
are not populated yet
- Support for mobile browsers
- Chrome Android
- Firefox for Android
- Opera Android
- Safari on iOS
- Samsung Internet
- WebView Android
- Populate the field
layoutVersion
- Populate the field
osVersion
- Sandbox to prevent feature spoofing
- Giacomo Trudu - Wicker25
- Giuseppe Trotta - ohpe
- Michael Wigham - Michael-Wigham
See also the list of contributors who participated in this project.
Paguro's Browser Detection is MIT licensed.