Search notes:

window.innerWidth / window.innerHeight

window.innerWidth and window.innerHeight evaluate to the width and height of the viewport.
If scrollbars are present, the drawable area of the viewport is slightly smaller than that which is indicated by innerWidth and innerHeight.
The returned amount of pixel does not represent physical pixels on the screen, but the amount of visible pixels that takes into account the current zoom-in or zoom-out factor. Thus, window.innerWidth can be larger than window.outerWidth if the content is zoomed in.

See also

Programming for a web browser: Coordinates of the window, screen and Element object (etc)
<meta name="viewport" … >
The window object.

Index