Information about Visitors to your Site

There is a fair amount of information available about the visitors who come to your site that tell you about the browser that they are using and how big their browser window is. You can use this information to help you determine how to display your page.

System Properties 
navigator.appVersionthe Operating System used by the visitor
screen.widthtotal width of the visitor's screen
screen.heighttotal height of the visitor's screen
screen.availWidthfull screen width of the visitor's browser window
screen.availHeightfull screen height of the visitor's browser window
screen.colorDepthnumber of colours that the visitor's screen is set to use
 
Browser Properties 
navigator.appNamename visitor's browser identifies itself as (not necessarily what it actually is)
parseInt(navigator.appVersion)browser version number
window.outerWidthactual width of visitor's browser window
window.outerHeightactual height of visitor's browser window
 
Page Properties 
window.innerWidththe available display width within the visitor's browser window (Netscape only)
document.body.clientWidththe available display width within the visitor's browser window (not Netscape)
window.innerHeightthe available display height within the visitor's browser window (Netscape only)
document.body.clientHeightthe available display height within the visitor's browser window (not Netscape)
window.pageXOffsetthe current scroll distance from the left of the page (Netscape and Opera only)
document.body.scrollLeftthe current scroll distance from the left of the page (not Netscape or IE strict)
document.documentElement.scrollLeftthe current scroll distance from the left of the page (not Netscape or IE transitional)
window.pageYOffsetthe current scroll distance from the top of the page (Netscape and Opera only)
document.body.scrollTopthe current scroll distance from the top of the page (not Netscape or IE strict)
document.documentElement.scrollTopthe current scroll distance from the top of the page (not Netscape or IE transitional)

 

This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow
Donate