I have an issue with a UIWebView in my iPad app. When I try to load certain pages, it displays these cryptic error messages. Here’s the result from http://allhiphop.com/stories/news/archive/2009/04/02/21315001.aspx
This page contains the following errors:
error on line 45 at column 8: Opening and ending tag mismatch: meta line 0 and head
Below is a rendering of the page up to the first error.
...(blah blah blah)
I’m sure the people at AllHipHop have committed some serious syntactical crimes, but the part that confuses me is that these pages display just fine in Safari (on the iPad). Any idea what’s going on here? Something like webView.allowWhining=NO?
It turned out that AllHipHop was handling my app’s requests differently than Safari’s. UIWebView has a different user agent than iPad Safari. Go figure!
Setting the user agent solved my problem. Change User Agent in UIWebView (iPhone SDK) What is the iPad user agent?