Using Navigator Properties : Browser Info : Window Browser JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Window Browser » Browser Info »

 

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>
           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Window Browser
» Browser Info