The document area of a window is determined by innerWidth or clientWidth properties and innerHeight or clientHeight properties. It excludes the toolbars and scrollbars sizes. 

To get the window size with toolbars and scrollbars, outerWidth and outerHeight is used. However this property is not supported in IE8 and earlier versions of browsers.

Example of reading a window's size with browser object model (BOM) methods


›› go to examples ››