title: Detect if address bar is shown in iPhone browser
body: <p>I'm trying to detect, in a future-proof and device-independent way, when the address bar in the iPhone browser is showing. This is the toolbar that is shown at the top in order to display the URL. It can be hidden by calling:</p>
  
  <pre><code>window.scrollTo(0, 0)
  </code></pre>
  
  <p>What I'd like to do, is detect when it's being show (thus reducing the available viewing space) and set a timer to hide it again a second or so later. Any more frequent than that and it'll be quite annoying since users won't be able to get to the address bar.</p>
  
  <p>I've tried checking <code>window.pageYOffset</code>, unfortunately, this returns zero if any part of the url bar is visible.</p>
  
  <p>I <em>don't</em> want to hard code any dimensions on the iPhone and check those against the current viewport size. It's too fragile.</p>
  
  <p>Anyone know a solution here?</p>