ios - Tactics to speed up WKWebView rendering of loadHTMLString-d content? -
i've been experimenting stacking wkwebviews in uinavigationcontroller method of making hybrid app that's more native phonegap. broadly works - hook decidepolicyfornavigationaction when wkwebview hits link, , force new viewcontroller link wants.
but page loading slow. i've done can think of speed - it's using loadhtmlstring rather request ensure local - i've tried stripping out css , js see if speeds up, no dice. still takes @ to the lowest degree 500ms short, html only, locally stored page appear in empty wkwebview. can tell debugging delay not in reading html disk, time between loadhtmlstring() , didfinishnavigation().
does have tactics fixing this? i'd seek preload view, don't know link user going tap don't know preload.
an interim reply - having success creating next view in advance, using evaluatejavascript
run document.body.innerhtml = "content"
- not have half-second delay. of course, means creating wkwebview before otherwise, isn't performance killer.
ios uiwebview wkwebview
No comments:
Post a Comment