clientInformation object
Contains information about the browser and the operating system of the user.
For cross-browser functionality, use the navigator object instead.
Syntax:
Properties that reference the object:
| window.clientInformation |
Possible members:
Properties:
Retrieves the code name of the browser. | ||||||||||||
Returns the minor version of the browser. | ||||||||||||
Returns the name of the browser. | ||||||||||||
Returns the platform and version of the browser. | ||||||||||||
Returns the language of the browser application or the operating system's user interface. | ||||||||||||
Retrieves a Boolean value that indicates whether cookies are enabled in the browser. | ||||||||||||
Returns the central processing unit (CPU) class of the user's operating system. | ||||||||||||
Returns the language of the browser application. | ||||||||||||
Represents a collection of all supported MIME types. | ||||||||||||
Returns a Boolean value that indicates whether the browser is working online. | ||||||||||||
Returns the name of the operating system platform. | ||||||||||||
Represents a collection of all installed plugins in the browser. | ||||||||||||
Returns a string that contains information about the browser engine. | ||||||||||||
Returns a string that contains information about the development build number of the browser engine. | ||||||||||||
Returns the language edition of the operating system. | ||||||||||||
Returns a string value that represents the user-agent header. | ||||||||||||
Returns the current Regional and Language settings of the operating system in Internet Explorer and the language of the browser application in Opera. | ||||||||||||
|
Contains information about the current user's profile. | |||||||||||
Returns a string that specifies the name of the browser vendor. | ||||||||||||
Returns a string that specifies the version number of the browser given by the vendor. |
Methods:
javaEnabled | Returns a Boolean value that indicates whether Java is enabled in the current browser. | ||||||
taintEnabled | Returns a Boolean value that indicates whether the data-tainting security model is enabled. |
Example HTML code 1:
This example displays various information about the browser and the operating system of the user:
|
||||
<head> <script type="text/javascript"> function AddRowToInfo (description, value) { if (value !== undefined) { var infoTable = document.getElementById ("info"); var row = infoTable.insertRow (-1); var cell = row.insertCell (-1); cell.innerHTML = description; cell.style.paddingRight = "10px"; cell = row.insertCell (-1); cell.innerHTML = value; cell.style.paddingLeft = "10px"; } } function GetVisitorInfo () { if (window.clientInformation) { AddRowToInfo ("Name of the browser (appName)", window.clientInformation.appName); AddRowToInfo ("Name of the browser vendor (vendor)", window.clientInformation.vendor); AddRowToInfo ("Code name of the browser (appCodeName)", window.clientInformation.appCodeName); AddRowToInfo ("Engine of the browser (product)", window.clientInformation.product); AddRowToInfo ("Build number of the browser engine (productSub)", window.clientInformation.productSub); if (window.opera) { AddRowToInfo ("Build number of the browser (buildNumber)", window.opera.buildNumber ()); AddRowToInfo ("Version number of the browser (version)", window.opera.version ()); } AddRowToInfo ("Version and platform of the browser (appVersion)", window.clientInformation.appVersion); AddRowToInfo ("Version of the browser given by the vendor (vendorSub)", window.clientInformation.vendorSub); AddRowToInfo ("Minor version of the browser (appMinorVersion)", window.clientInformation.appMinorVersion); AddRowToInfo ("Build identifier of the browser (buildID)", window.clientInformation.buildID); AddRowToInfo ("User-agent request header (userAgent)", window.clientInformation.userAgent); AddRowToInfo ("Language of the browser (language)", window.clientInformation.language); AddRowToInfo ("Cookies are enabled (cookieEnabled)", window.clientInformation.cookieEnabled); AddRowToInfo ("Operating system (platform)", window.clientInformation.platform); if (window.clientInformation.language === undefined) { // in Opera, the language, browserLanguage and userLanguage properties are equivalent AddRowToInfo ("Language of the operating system's user interface (browserLanguage)", window.clientInformation.browserLanguage); AddRowToInfo ("Regional and Language settings of the operating system (userLanguage)", window.clientInformation.userLanguage); } AddRowToInfo ("Language of the installed operating system (systemLanguage)", window.clientInformation.systemLanguage); AddRowToInfo ("Class of CPU (cpuClass)", window.clientInformation.cpuClass); AddRowToInfo ("Information about the OS and CPU (oscpu)", window.clientInformation.oscpu); AddRowToInfo ("System is online (onLine)", window.clientInformation.onLine); } else { alert ("Your browser does not support the clientInformation object!"); } } </script> </head> <body onload="GetVisitorInfo ();"> <table id="info" cellpadding="0px" cellspacing="0px" border="1px" style="empty-cells:show;"> <colgroup> <col style="background-color: #e0a0b0;" /> <col /> </colgroup> <tbody> </tbody> </table> </body> |
||||
|
||||
Did you find this example helpful?
|
Related pages:
External links:
User Contributed Comments