Navigator Object in JavaScript
We need to know how to use properties and methods of Navigator object in JavaScript to make powerful applications. Navigator object gives us to get browser information of client. There is a list of all properties and methods in Javascript.
I. All Common Navigator Properties in JavaScript
|
Property |
Description |
|
appCodeName : |
The code name of the browser |
|
appName : |
The name of the browser |
|
appVersion : |
The version information of the browser |
|
mimeTypes : |
Returns array of all MIME types supported by the client |
|
platform : |
Returns the platform of visitor’s computer |
|
plugins : |
Returns array of all plug-ins which is installed on visitor’s computer |
|
userAgent : |
Returns the user-agent header |
|
onLine : |
Returns bolean value of browser’s online status |
|
cookieEnabled : |
Returns bolean value of browser’s cookie status |
|
cookieEnabled : |
Returns bolean value of browser’s cookie status |
II. Special Navigator Properties in JavaScript
This is a list of special navigator properties of Browsers.
|
Property |
Description |
Works On |
|
appMinorVersion : |
Returns the minor version of the browser. |
MSIE 4.0 |
|
cpuClass : |
returns the CPU class of the browser’s system. |
MSIE 4.0 |
|
opsProfile : |
Returns null value in MSIE and Netscape Navigator. |
MSIE 5.0 only |
|
userProfile : |
Returns user profile |
MSIE 4.0 |
|
systemLanguage : |
Returns the system language of visitor’s computer. It may return language valua as code on some platforms. |
MSIE 4.0 |
|
userLanguage : |
Returns the user language of client |
MSIE 4.0 |
|
language : |
Returns the language of client |
FireFox |
|
browserLanguage : |
Returns the language of client’s browser. |
Opera Only |
|
oscpu : |
Returns a string that identifies the current operating system. |
Firefox Only |
|
vendor : |
Returns the name of the browser vendor for the current browser. |
Firefox Only |
|
vendorSub : |
is the substring of the vendor having to do with the vendor version number. |
Firefox Only |
|
product : |
returns the product name of the browser. |
Firefox Only |
|
productSub : |
returns the build number of the browser. |
Firefox Only |
|
buildID : |
Returns the build identifier of the browser. |
Firefox Only |
III. All Navigator Methods in JavaScript
|
Method |
Description |
|
javaEnabled() MSIE 4.0, Opera, FireFox |
Returns bolean value of browser’s JavaScript-Enabled status |
|
refresh() MSIE 4.0, Opera, FireFox |
Checks for any new plug-ins installed on the browser |
|
preference() MSIE 4.0, Opera, FireFox |
Reads or sets any user preferences in the browser. Changing a preference via this method requires the UniversalPreferencesWrite privilege. |
|
savePreferences()
|
Saves immediately the Navigator preferences to the local file prefs.js. |
|
taintEnabled() MSIE 4.0 |
Returns whether data tainting is enabled. |
|
registerContentHandler() Firefox |
Gives autorithy to web sites to register themselves as possible handlers for content of a particular MIME type. |
|
registerProtocolHandler() MSIE 4.0 |
Gives autorithy to web sites to register themselves as possible handlers for content of a particular protocols. |
|
mozIsLocallyAvailable() MSIE 4.0 |
Checks whether or not a specified resource is available. |

Recently Typed