Exploit the Navigator object to get details about browser and its extensions and plugins.
Earlier Navigator object was used only to determine whether clients systems were running, Internet Explorer or Netscape i.e browser-sniffing
Currently the navigator object can be used to check the Browser Version, whether Java is enabled, plugins attached etc.
|appCodeName||The Code name of the Browser.|
|appName||The name of the Browser.|
|appVersion||Specifies the Version of the Browser.|
|mimeTypes||Array of MIME types registered with the browser.|
|platforms||The operation system on which the browser runs.|
|userAgent||The HTTP user-agent header sent from the browser to the server.|
In the below demo, the special loop is used to assign each property of the navigator object to variable navigatorProperty.
The Navigator object is used mostly to detect the presence of plug-ins installed on the browser, it uses the plugins array for that purpose. The items in the array comprise of the following property.
name : The plug-in name.
description : The plug-in name.
filename : The filename of the plug-in.
length : The number of MIME types handled by the plugin.
Plug-Ins are programs which can be used by the browser to add abilities to play audio files, videos, animation, view PDF files etc. Eg: Adobe Acrobat Reader, Shockwave/Flash Player etc.
MIME(Multipurpose Internet Mail Extension) specifies the protocol standard used to exchange different types of data files over the Internet. Eg: Audio, video, text etc.
The mimeType object are predefined and are used to access the mimeTypes array which belongs to both the navigator object and plugin object.
|description||To provide description about the MIME Type.|
|enabledPlugin||To point to the plugin object for the specified MIME type.|
|suffixes||The extension of the file. Eg .png, .pdf|
|type||To name the MIME type. eg: image/png|