Navigator object in JavaScript

In this article, we will show you the properties of the navigator object in JavaScript.

The window.navigator object contains information about the visitor’s browser. A Navigator object can be retrieved using the read-only window.navigator or navigator property.

List of the navigator properties

  1. Browser platform
  2. Browser language
  3. Is the browser online
  4. Browser cookies
  5. Browser application name
  6. Browser application code name
  7. Browser version
  8. Browser agent

1. Browser platform

Use the navigator.platform to get the browser platform.

2. Browser language

The navigator.language returns the language.

3. Is the browser online

Use the navigator.onLine to check if the browser is online or offline. It returns the boolean value.

4. Browser cookies

The navigator.cookieEnabled returns true if the cookie is enabled otherwise false.

5. Browser application name

Use the navigator.appName to get the browser application name. Netscape is the application name for IE11, Chrome, Firefox, and Safari.

6. Browser application code name

Use the navigator.appCodeName to get the application code name. Mozilla is the application code name for Chrome, Firefox, IE, Safari, and Opera.

7. Browser version

The navigator.appVersion to get the browser version.

8. Browser agent

Use the navigator.userAgent to get the user agent.

I hope you find this article helpful.
Thank you for reading. Happy Coding..!! ๐Ÿ™‚

If you found value in this article,
you can support us by buying me a coffee! โ˜•

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *