JavaScript Browser Detection with the Navigator Object

The key to writing solid DHTML in the past was to find out which browser was looking at your page. To do this, browser detection was required. This is not so much the case anymore, but in the event your script needs to know more about the browser, the navigator object and its properties supply a lot of information.

navigator.appCodeName
navigator.appMinorVersion
navigator.appName
navigator.appVersion;
navigator.cookieEnabled
navigator.cpuClass
navigator.onLine
navigator.platform
navigator.userAgent
navigator.browserLanguage
navigator.systemLanguage
navigator.userLanguage
The result of each property of the navigator object has been printed to the textarea below. The result depends on your browser






Home | Contact