title: iPhone Safari screen.availHeight and statusbar / toolbar / addressbar
body: <p>I'm trying to get the available screen size in iPhone Safari in order to shrink a container to the height of the screen, minus the statusbar and toolbar.</p>
  
  <p>Since iOS always returns screen dimensions as though the phone is in portrait orientation, I'm using screen.availWidth to work out the height in landscape. The following are the dimensions returned:</p>
  
  <pre><code>screen.width; //320
  screen.availWidth; //300
  </code></pre>
  
  <p>The 20px difference accounts for the top statusbar on the phone but doesn't take into account the button bar (toolbar) at the bottom of the screen.</p>
  
  <p>Is there any property that I can use that would return 268px?</p>
  
  <p>I would just do (screen.availWidth - 32) but there's a chance the user will add the site as a desktop bookmark, in which case this bar won't be present and the 300px value would be correct.</p>