The innerHeight, innerWidth, outerHeight and outerWidth properties will return numeric values that represent the browser and document window. The outer dimensions represent the actual browser software window, while the inner dimensions represent the document window nested inside the browser window.
In this example we will access the browser window dimensions as well as the document window dimensions. Repeatedly resize your browser window and press the button to see numbers change.
var h = window.innerHeight;
var w = window.innerWidth;
alert("Inner is "+h+" pixels in height and "+w+" pixels in width");
var h = window.outerHeight;
var w = window.outerWidth;
alert("Outer is "+h+" pixels in height and "+w+" pixels in width");
<button onclick="getWindowInnerSize()">Get Window Inner Size</button>
<button onclick="getWindowOuterSize()">Get Window Outer Size</button>