HTML CSS Bootstrap Javascript Icons Python
JavaScript Reference
Overview
JS Reference
JS Array Object JS Boolean Object JS Date Object JS Style Declaration Object JS Error Object JS Global Object JS Math Object JS Number Object JS String Object JS RegExp Object JS Statements
DOM Reference
DOM Attribute DOM Console DOM Document DOM Element DOM Events DOM Event Objects DOM History DOM HTMLCollection DOM Location DOM Navigator DOM Screen DOM Style DOM Window WEB Storage

The Navigator Object

The JavaScript navigator object is used for browser detection.

It can be used to get browser information such as appName, appCodeName, userAgent etc.

The navigator object is part of the window object and can be written without the window prefix.

Navigator Object Properties

The following table lists the properties of the Navigator object:

Property Description
appCodeName Returns the code name of the browser
appName Returns the name of the browser
appVersion Returns the version information of the browser
cookieEnabled Determines whether cookies are enabled in the browser
geolocation Returns a Geolocation object that can be used to locate the user's position
language Returns the language of the browser
onLine Determines whether the browser is online
platform Returns for which platform the browser is compiled
product Returns the engine name of the browser
userAgent Returns the user-agent header sent by the browser to the server

Navigator Object Methods

The following table lists the methods of the Navigator object:

Method Description
javaEnabled() Checks if java is enabled
taintEnabled() Checks if taint is enabled. It is deprecated since JavaScript 1.2