Richard Gnall

Browser & OS Sniffing

JavaScript can be used to acquire information about the browser and operating system environment within which a webpage is displayed.

Your Operating System and Browser

OS Information:

screen.width
screen.height
screen.availWidth
screen.availHeight
screen.colorDepth
navigator.cpuClass
Operating System

Browser Information:

navigator.appName
navigator.appVersion
parseFloat(navigator.appVersion) 
navigator.appCodeName
navigator.userAgent
navigator.appMinorVersion
navigator.browserLanguage
navigator.cookieEnabled
navigator.javaEnabled()
jsVersion

document.body.clientWidth
document.body.clientHeight
window.innerWidth
window.innerHeight