Window outerWidth
Example
Get the browser window's height and width:
let width = window.outerWidth;
Try it Yourself »
let width = outerWidth;
Try it Yourself »
More examples below.
Description
The outerWidth
property returns the outer width of the browser window, including all interface elements
(like toolbars/scrollbars).
TheouterWidth
property is read only.
Syntax
window.outerWidth
or just:
outerWidth
Return Value
Type | Description |
A number | The width of the browser's window, including all interface elements, in pixels. |
More Examples
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 »
Browser Support
window.outerWidth
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 9-11 |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.