Navigator userAgent Property
Navigator object
Definition and Usage
The userAgent property is a read-only string that declares the value of the user agent header used by the browser for HTTP requests.
Syntax
navigator.userAgent
Browser support
All major browsers support the userAgent property
| Chrome | IE | Edge | Firefox | Safari | Opera |
| Yes | Yes | Yes | Yes | Yes | Yes |
Example
Example
The user agent header sent by your browser:
document
.
write
(
"
User agent:
"
navigator
.
userAgent
)
;
The output of the above example is:
Try it »
More examples
This example contains all navigator properties.
Navigator object