javaScript window navigator

The window.navigator object contains information about the visitor’s browser.

The window.navigator object can be written without the window prefix.

 

Some of its properties are tabulated below…

Name
Description
Version
appCodeName
Specifies the code name of the browser.
Implemented in JavaScript 1.0
appName
Specifies the name of the browser.
Implemented in JavaScript 1.0
appVersion
Specifies version information for the Navigator.
Implemented in JavaScript 1.0
language
Indicates the translation of the Navigator being used.
Implemented in JavaScript 1.2
mimeTypes
An array of all MIME types supported by the client.
Implemented in JavaScript 1.1
platform
Indicates the machine type for which the Navigator was compiled.
Implemented in JavaScript 1.2
plugins
An array of all plug-ins currently installed on the client.
Implemented in JavaScript 1.1
userAgent
Specifies the user-agent header.
Implemented in JavaScript 1.0

 

 

Warning !!!

The information from the navigator object can often be misleading, and should not be used to detect browser versions because:

  • The navigator data can be changed by the browser owner
  • Some browsers misidentify themselves to bypass site tests
  • Browsers cannot report new operating systems, released later than the browser

Differences between javaScript setTimeout and setInterval

The important difference is that, whereas setTimeout() triggers expression only once after the timeout , setInterval() keeps triggering expression again and again in intervals (unless you tell it to stop).