What is the DOM Navigator Object?

The navigator object of DOMDocument Object Model contains the information of the user agent, i.e., the browser. It can be retrieved using the read-only window.navigator property.

Navigator object properties

  1. appCodeName: It returns the code name of the browser.
Console
  1. appName: It returns the name of the browser.
Console
  1. appVersion: It returns the version of the browser.
Console
  1. cookieEnabled: It returns a boolean which specifies whether cookies are enabled in the browser.
Console
  1. geolocation: It returns an object specifying the location.
Console
  1. language: It returns the language version of the browser.
Console
  1. onLine: It returns a boolean specifying whether browser is online.
Console
  1. platform: It returns the platform for which the browser is compiled.
Console
  1. product: It returns the name of the engine of the browser.
Console
  1. userAgent: It returns the value of the user-agent header sent by the browser to the server.
Console

Navigator object methods

  1. javaEnabled(): It returns a boolean specifying whether the browser has Java enabled.
Console
  1. taintEnabled(): It returns a boolean specifying whether the browser has Data tainting enabled.
Console

Note: There are some properties and methods that are deprecated in the latest version of JavaScript from the above list. To view the full list of properties and methods, visit the following page.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources