English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript Navigator Object

The JavaScript Navigator object is used for browser detection.

It can be used to obtain browser information, such as appName, appCodeName, userAgent, and so on.

The Navigator object iswindow (Window)Part of an object that can be written without a window prefix.

Navigator Object Properties

The following table lists the properties of the Navigator object:

PropertiesDescription
appCodeNameReturns the code name of the browser
appNameReturns the name of the browser
appVersionReturns the version information of the browser
cookieEnabledDetermines if cookies are enabled in the browser
geolocationReturns a Geolocation object that can be used to locate the user's location
languageReturns the language of the browser
onLineDetermines if the browser is online
platformReturns the platform for which the browser is compiled
productReturns the name of the browser engine
userAgentReturns the user agent header sent by the browser to the server

Navigator Object Methods

The following table lists the methods of the Navigator object:

MethodDescription
javaEnabled()Check if Java is enabled
taintEnabled()Check if pollution is enabled.Since JavaScript 1.2Not recommended to use