What’s the width and height of the visible part of my browser?!

If you ever wondered what your browser height and width is, don’t waste your time anymore but check it out with JavaScript. Actually there’s a difference, normally, between document height and the browser height for instance. The document can be higher than the browser, and that occurs when there’s a vertical scroll on the page.

In fact it’s quite easy to get the browser height and width (what we see as the white part of a blank page).

Simply check that out by dumping:

window.innerWidth & window.innerHeight

Leave a Reply

Your email address will not be published. Required fields are marked *