Loading Please Wait...

Logo Lynxsia IT Solutions

JavaScript Window Navigator

JS Window Navigator

The window.navigator object contains information about the visitor's browser.

Window Navigator

The window.navigator object can be written without the window prefix.

Some examples:

  • navigator.cookieEnabled
  • navigator.appCodeName
  • navigator.platform
Browser Cookies

The navigator.cookieEnabled property returns true if cookies are enabled, otherwise false.

					 
        
          alert(navigator.cookieEnabled);
        
      
Browser Application Name

The navigator.appName property returns the application name of the browser.

This property is removed (deprecated) in the latest web standard. Most browsers returns Netscape as appName.

					 
        
          alert(navigator.appName);
        
      
Browser Application Code Name

The navigator.appCodeName property returns the application code name of the browser.

This property is removed (deprecated) in the latest web standard. Most browsers returns Mozilla as appCodeName.

					 
        
          alert(navigator.appCodeName);
        
      
The Browser Engine

The navigator.product property returns the product name of the browser engine.

This property is removed (deprecated) in the latest web standard. Most browsers returns Gecko as product.

					 
        
          alert(navigator.product);
        
      
The Browser Version

The navigator.appVersion property returns version information about the browser.

					 
        
          alert(navigator.appVersion);
        
      
The Browser Agent

The navigator.userAgent property returns the user-agent header sent by the browser to the server.

					 
        
          alert(navigator.userAgent);
        
      
The Browser Platform

The navigator.platform property returns the browser platform (operating system).

					 
        
          alert(navigator.platform);
        
      
The Browser Language

The navigator.language property returns the browser's language.

					 
        
          alert(navigator.language);
        
      
Is The Browser Online?

The navigator.onLine property returns true if the browser is online.

					 
        
          alert(navigator.onLine);
        
      
Is Java Enabled?

The navigator.javaEnabled() method returns true if Java is enabled

					 
        
          alert(navigator.javaEnabled());
        
      

The information from the navigator object can often be misleading.

The navigator object should not be used to detect browser versions because:

  • Different browsers can use the same name
  • The navigator data can be changed by the browser owner
  • Some browsers misidentify themselves to bypass site tests
  • Browsers cannot report new operating systems, released later than the browser

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved