Easily generate a browser user agent!
npm install get-user-agent
const useragent = require('get-user-agent');
console.log(useragent.firefox(75));
- chrome(version, [sysInfo]) ⇒
string
Chrome user agent
- chromeAdvanced(version, webkitVersion, [sysInfo]) ⇒
string
Chrome user agent with advanced options
- firefox(version, [sysInfo]) ⇒
string
Safari user agent
- firefoxAdvanced(version, geckoVersion, [sysInfo]) ⇒
string
Firefox user agent with advanced options
- opera(version, [sysInfo]) ⇒
string
Opera user agent
- operaAdvanced(version, prestoVersion, operaVersion, [sysInfo]) ⇒
string
Opera user agent with advanced options
- safari(version, [sysInfo]) ⇒
string
Safari user agent
- safariAdvanced(version, webkitBuildVersion, safariBuildVersion, [sysInfo]) ⇒
string
Safari user agent with advanced options
Chrome user agent
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
sysInfo (optional) | string |
System information |
Chrome user agent with advanced options
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
webkitVersion | number | string |
Webkit version |
sysInfo (optional) | string |
System information |
Safari user agent
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
sysInfo (optional) | string |
System information |
Firefox user agent with advanced options
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
geckoVersion | number | string |
Gecko version |
sysInfo (optional) | string |
System information |
Opera user agent
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
sysInfo (optional) | string |
System information |
Opera user agent with advanced options
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
prestoVersion | number | string |
Presto version |
operaVersion | number | string |
Opera version |
sysInfo (optional) | string |
System information |
Safari user agent
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
sysInfo (optional) | string |
System information |
Safari user agent with advanced options
Returns: string
- User agent
Param | Type | Description |
---|---|---|
version | number | string |
Browser version |
webkitBuildVersion | number | string |
Webkit build version |
safariBuildVersion | number | string |
Safari build version |
sysInfo (optional) | string |
System information |