Window outerWidth property

Definition and usage

outerWidth The property returns the external width of the browser window, including all interface elements (such as toolbars/scroll bars).

outerWidth The property is read-only.

See also:

outerHeight property

innerWidth property

innerHeight property

Instance

Example 1

Get the height and width of the browser window:

let width = window.outerWidth;

Try it yourself

let width = outerWidth;

Try it yourself

Example 2

All height and width properties:

let text =
"<p>innerWidth: " + window.innerWidth + "</p>" +
"<p>innerHeight: " + window.innerHeight + "</p>" +
"<p>outerWidth: " + window.outerWidth + "</p>" +
"<p>outerHeight: " + window.outerHeight + "</p>";

Try it yourself

Syntax

window.outerWidth

Or:

outerWidth

Return value

Type Description
Number The width of the browser window, including all interface elements, in pixels.

Browser support

All browsers support window.outerWidth:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support 9-11 Support Support Support Support