I was always worried about the behavior of pre-iOS-6, because by default UIWebView uses the screen size of the device, not the view frame. However, adding the following viewport meta viewport fixes the issue for me also on iOS 5. Try to download content only after the web view has the final frame.
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
source share