To detect whether the browser window is in landscape or portrait mode, you can compare the browser window’s width and height.

But from my experience it’s easy to get confused in the bunch of sizes: screen, window, web page sizes.

How are these sizes defined, and, importantly, how to access them is what I’m going to discuss in this post.

#javascript #screen

How to Get the Screen, Window, and Web Page Sizes in JavaScript
25.20 GEEK