Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

javascript

What is the DOM Navigator Object?

Shubham Singh Kshatriya

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

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.

RELATED TAGS

javascript

CONTRIBUTOR

Shubham Singh Kshatriya

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring