iPhone UIWebView slow loading to local HTML files

前端 未结 7 1480
无人及你
无人及你 2021-02-01 03:47

I\'m developing an app that requires caching web pages (completely) along with their CSS files and images after saving the entire HTML of the page (going through the links to st

7条回答
  •  感情败类
    2021-02-01 04:17

    Just if in case someone happens the same to me...

    I had a UIWebView that was loading a string html and every resource (js and css) was stored locally.

    I've faced that loading the content with internet connection it was some kind of slow (1 or 2 seconds to load and appear the webview in my controller) but when I tried to load the same page WITHOUT internet connection it was fast, really fast.

    I've remembered that my HTML template had this in the start that I've used to load some images whit relative paths in some contents.

    Removing that work as charm. So that can be making your web view load slower even if you don't have any reference to extern content in your HTML.

提交回复
热议问题