Navigator

The window.navigator or navigator is a read-only property and contains different methods and functions related to the browser.

Let's look at a few examples of navigation.

  1. navigator.appName: It gives the name of the browser application

    navigator.appName; 
    // "Netscape"
    

    Note: "Netscape" is the application name for IE11, Chrome, Firefox, and Safari.

  2. navigator.cookieEnabled: Returns a boolean value based on the cookie value in the browser.

    navigator.cookieEnabled;
    //true
    
  3. navigator.platform: Provides information about the browser operating system.

    navigator.platform;
    "MacIntel"
    

results matching ""

    No results matching ""