Course recommendation:

Window Navigator Object

Navigator object

The Navigator object contains information about the browser.

The Navigator object is a property of the window object.

The Navigator object can be accessed in the following way: window.navigator or simplynavigator

:

Example

let url = navigator.language;

let url = window.navigator.language;

let url = navigator.language;

Try it yourself

Properties Description
Navigator object properties Returns the code name of the browser.
appName Returns the name of the browser.
appVersion Returns the version of the browser.
cookieEnabled Returns true if browser cookies are enabled.
geolocation Returns the geolocation object of the user's location.
language Returns the language of the browser.
onLine Returns true if the browser is online.
platform Returns the platform of the browser.
product Returns the name of the browser engine.
userAgent Returns the user agent header of the browser.

Methods of the Navigator object

Methods Description
javaEnabled() Returns true if Java is enabled in the browser.
taintEnabled() Removed in JavaScript version 1.2 (1999).

Other related properties

Properties Description
appMinorVersion Returns the secondary version of the browser.
browserLanguage Returns the language of the current browser.
cpuClass Returns the CPU level of the browser system.
systemLanguage Returns the default language used by the OS.
userLanguage Returns the natural language settings of the OS.

Description of the Navigator object

The Navigator object contains properties that describe the browser being used. These properties can be used for platform-specific configuration.

Although the name of this object is clearly that of Netscape's Navigator browser, other browsers that have implemented JavaScript also support this object.

The instance of the Navigator object is unique and can be referenced by the navigator property of the Window object.