Languages
[Edit]
EN

JavaScript - get browser window size

3 points
Created by:
Zayaan-Rasmussen
543

In this article, we would like to show you how to get browser window size using JavaScript.

Quick solution:

Note:

This solution measures the outer size of the window.

 

Offset interpretation:

Window offset width and height interpretation in JavaScript.
Window offset width and height interpretation in JavaScript.

Practical example

Edit

In this section, we present a full example of how to get browser window size.

 

See also

Edit
  1. JavaScript - get entire document size

  2. JavaScript - get entire document height

  3. JavaScript - get entire document width

References

Edit
  1. Window.outerWidth - Web APIs | MDN
  2. Window.outerHeight - Web APIs | MDN
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join