Tuesday , 18 June 2019
Home / Programming / JavaScript / Navigator Object – Advanced JavaScript Tutorial
Navigator Object
Navigator Object

Navigator Object – Advanced JavaScript Tutorial

The navigator object allows you to grab information about the browser and visitor’s computer. You can grab the browser name, plugins, OS, language, etc.


Clear your script and add this bit of code.

The navigator object is pretty tricky. Even though the navigator object has been around since Netscape Navigator 2, the properties and methods are supported in various browsers. The above code has properties supported in all browsers. Let’s go over each one.

  1. appName – This property contains the full browser name.
  2. appVersion – This property contains the version of the browser.
  3. onLine – This property returns true if the user is currently connected to the internet. False is returned if they aren’t connected to the internet.
  4. platform – This property contains the system platform the visitor is currently using.
  5. plugins – This property contains an array of plugins installed on the visitor’s current browser.
  6. userAgent – This property contains the user-agent for the  browser.
  7. language – This property contains the language the primary browser is using.
  8. vendor – This property contains the brand name of the browser.
  9. cookieEnabled – This property contains true of false if cookies are enabled in the browser.

There are more properties, but these are supported in all browsers.


Add this bit of code to your script.

There’s only 1 method that works in all browsers which is the javaEnabled() method. This method will return true if the browser has Java installed. False if it isn’t.

The navigator comes with more methods, but some of those methods are browser specific.


The navigator object can really help you detect the settings and info about the current browser. If you would like more information on the navigator object, then go here.


About Jasko Koyn

Check Also


Audio – Advanced JavaScript Tutorial

The video and audio objects both have the same events, properties and methods. So, you …

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.