JavaScript Navigator Object

The JavaScript navigator object is the object representation of the client internet browser or web navigator program that is being used. This object is the top level object to all others.

Navigator Properties

  • appCodeName - The name of the browser's code such as "Mozilla".
  • appMinorVersion - The minor version number of the browser.
  • appName - The name of the browser such as "Microsoft Internet Explorer" or "Netscape Navigator".
  • appVersion - The version of the browser which may include a compatability value and operating system name.
  • cookieEnabled - A boolean value of true or false depending on whether cookies are enabled in the browser.
  • cpuClass - The type of CPU which may be "x86"
  • mimeTypes - An array of MIME type descriptive strings that are supported by the browser.
  • onLine - A boolean value of true or false.
  • opsProfile
  • platform - A description of the operating system platform. In my case it is "Win32" for Windows 95.
  • plugins - An array of plug-ins supported by the browser and installed on the browser.
  • systemLanguage - The language being used such as "en-us".
  • userAgent - In my case it is "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)" which describes the browser associated user agent header.
  • userLanguage - The languge the user is using such as "en-us".
  • userProfile

Methods

  • javaEnabled() - Returns a boolean telling if the browser has JavaScript enabled.
  • taintEnabled() - Returns a boolean telling if the browser has tainting enabled. Tainting is a security protection mechanism for data.

Navigator Objects

Most Navigator objects have corresponding HTML tags. Refer to the appropriate object section for more information.

  • MimeType - Allows access to information about MIME types supported by the browser.
  • plugin - Access to information about all plugins the browser supports. <EMBED>
  • window - The browser frame or window.
    • frame- Allows access to all frames in the window. <FRAME>
    • history - The URLs previously accessed in a window.
    • location - Represents a URL.
    • document - The HTML document loaded in the window. <BODY>
      • anchor object anchors array - Allows access to all anchors in the document. <A NAME="">
      • applet - Allows access to all applets in the document.
      • area - Allows access to an area in a client image map. <MAP>
      • image object images array - Allows access to all images in the document. <IMG>
      • link object links array - Allows access to all links in the document. <A HREF="">
      • layer - Allows access to HTML layers.
      • forms - Allows access to all forms in the document. <FORM>
        • button - Allows access to a form button exclusive of a submit or reset button. <INPUT TYPE="button">
        • checkbox - Allows access to a formcheckbox. <INPUT TYPE="checkbox">
        • element - Allows access to buttons or fields in a form.
        • FileUpLoad - Allows access to a form file upload element. <INPUT TYPE="file">
        • hidden - Allows access to a form hidden field. <INPUT TYPE="hidden">
        • option
        • password - Allows access to a form password field. <INPUT TYPE="password">
        • radio - Allows access to a form radio button set. <INPUT TYPE="radio">
        • reset - Allows access to a form reset button.. <INPUT TYPE="reset">
        • select - Allows access to a form selected list with the option allowing access to selected elements in the select list. <SELECT>
        • submit - Allows access to a form submit button. <INPUT TYPE="submit">
        • text - Allows access to a form text field. <INPUT TYPE="text">
        • textarea - Allows access to a form text area field. <TEXTAREA>
  • embeds - Allows access to embedded plug ins.