title: How do I reset the scale/zoom of a web app on an orientation change on the iPhone?
body: <p>When I start my app in portrait mode, it works fine. Then I rotate into landscape and it's scaled up.  To get it to scale correctly for the landscape mode I have to double tap on something twice, first to zoom all the way in (the normal double tap behavior) and again to zoom all the way out (again, the normal double tap behavior).  When it zooms out, it zooms out to the correct NEW scale for landscape mode.</p>
  
  <p>Switching back to portrait seems to work more consistently; that is, it handles the zoom so that the scale is correct when the orientation changes back to portrait.</p>
  
  <p>I am trying to figure out if this is a bug? or if this is  something that can be fixed with JavaScript?</p>
  
  <p>With the viewport meta content, I am setting the initial-scale to 1.0 and I am NOT setting minimum or maximum scale (nor do I want to).  I am setting the width to device-width.</p>
  
  <p>Any ideas? I know a lot of people would be grateful to have a solution as it seems to be a persistent problem.</p>