title: How to get the browser viewport dimensions?
body: <p>I want to provide my visitors the ability to see images in high quality, is there any way I can detect the window size?</p>
  
  <p>Or better yet, the viewport size of the browser with JavaScript? See green area here:</p>
  
  <p><a href="https://i.stack.imgur.com/zYrB7.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/zYrB7.jpg" alt=""></a></p>