Using Navigator Properties : Browser Info « Window Browser « JavaScript DHTML






Using Navigator Properties

 
<HTML>
<HEAD>
<TITLE>Detecting Browser Capabilities</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function displayNavigatorProperties() {
 with(document) {
  write("<B>appName: </B>")
  writeln(navigator.appName+"<BR>")
  write("<B>appVersion: </B>")
  writeln(navigator.appVersion+"<BR>")
  write("<B>appCodeName: </B>")
  writeln(navigator.appCodeName+"<BR>")
  write("<B>platform: </B>")
  writeln(navigator.platform+"<BR>")
  write("<B>userAgent: </B>")
  writeln(navigator.userAgent+"<BR>")
  write("<B>language: </B>")
  writeln(navigator.language+"<BR>")
  write("<B>Number of mimeTypes: </B>")
  writeln(navigator.mimeTypes.length+"<BR>")
  write("<B>Number of plugins: </B>")
  writeln(navigator.plugins.length)
 }
}
function displayExplorerProperties() {
 with(document) {
  write("<B>appName: </B>")
  writeln(navigator.appName+"<BR>")
  write("<B>appVersion: </B>")
  writeln(navigator.appVersion+"<BR>")
  write("<B>appMinorVersion: </B>")
  writeln(navigator.appMinorVersion+"<BR>")
  write("<B>appCodeName: </B>")
  writeln(navigator.appCodeName+"<BR>")
  write("<B>platform: </B>")
  writeln(navigator.platform+"<BR>")
  write("<B>cpuClass: </B>")
  writeln(navigator.cpuClass+"<BR>")
  write("<B>userAgent: </B>")
  writeln(navigator.userAgent+"<BR>")
  write("<B>cookieEnabled: </B>")
  writeln(navigator.cookieEnabled+"<BR>")
  write("<B>browserLanguage: </B>")
  writeln(navigator.browserLanguage+"<BR>")
  write("<B>userLanguage: </B>")
  writeln(navigator.userLanguage+"<BR>")
  write("<B>systemLanguage: </B>")
  writeln(navigator.systemLanguage+"<BR>")
  write("<B>onLine: </B>")
  writeln(navigator.onLine+"<BR>")
  write("<B>Number of mimeTypes: </B>")
  writeln(navigator.mimeTypes.length+"<BR>")
  write("<B>Number of plugins: </B>")
  writeln(navigator.plugins.length+"<BR>")
  write("<B>userProfile: </B>")
  writeln(navigator.userProfile)
 }
}
function displayBrowserProperties() {
 if(navigator.appName=="Netscape")
  displayNavigatorProperties()
 else
  if(navigator.appName=="Microsoft Internet Explorer")
   displayExplorerProperties()
}
displayBrowserProperties()
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
           
         
  








Related examples in the same category

1.Detects the browser, its version and the operating system of the client
2.Detects the language used by the client's browser
3.Indentify your browser
4.Navigator:detect the client's browser
5.More details about the client's browser
6.All details about the client's browser
7.Browser infomation
8.Accessing the Properties of the navigator Object
9.Writing Different Text to a Page Based on the Browser
10. Navigator Object
11.Functions to Examine Browsers
12.Get Browser version
13.Methods and Properties of the Frame Object
14.The Methods and Properties of the navigator Object
15.Verify browser language
16.Is cookie Enabled
17.document.alinkColor
18.document.lastModified
19.document.title
20.document.bgColor
21.document.fgColor
22.document.linkColor
23.document.vlinkColor