3

We have a UIWebView in our app, displaying HTML data loaded from memory (not a file). We are experiencing some very strange bug/behavior. Some pages take very long time to render (1-2 minutes). We looked at the source of the pages, and it is indeed very busy with badly written CSS and HTML (not in our control). However, we noticed that if we set a webview to load a page, and then press the power button to shut the iPhone's screen, then immediately press the power button again, and go back to our app, the webview renders the page instantly.

Has anyone experienced this? Any ideas what's going on?

3
  • Weird. You should probably file a bug to Apple. It looks like something on their end.
    – Josiah
    Commented Dec 24, 2012 at 19:22
  • Are you sure that all of the code that sends messages to the UIWebView (and every other UI object) runs on the main thread?
    – rob mayoff
    Commented Dec 24, 2012 at 19:24
  • Yes, all runs on the main thread. The code works for the most part, except for these specific pages. And once the screen is turned off and on, the "cork is popped" and the page is loaded instantly.
    – Léo Natan
    Commented Dec 24, 2012 at 19:39

1 Answer 1

0

So, uhm, forgot to answer this. It ended up that some of our HTML data had images that were linking to internal organization URLs, which were not accessible outside. And since the web view did not ask the delegate whether it should load, we didn't know about those resources. Pressing the power button caused the connections to drop, which made it render the page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.