Latest web development tutorials

Navigator userAgent property

Navigator Object Reference Navigator Objects

Definition and Usage

userAgent property is a read-only string that is used to declare the value of the browser User-Agent header of the HTTP request. .

grammar

navigator.userAgent


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support userAgent property


Examples

Examples

Your browser sends a user-agent header:

<Script>

document.write ( "User Agent:" + navigator.userAgent);

</ Script>

Examples of the above output:


try it"


Examples

More examples

This example contains all the navigator property.


Navigator Object Reference Navigator Objects