WKWebView reloads on app resume

Hi,

I’ve managed to get our app to run with WKWebView, and the performance improvement is quite significant, aspecially on older device. With the old webview, it was very slow on iphone 5 and basically unusable on iphone 4, but with WKWebView, on an iphone 5, it’s almost as fast as native apps. Quite amazing :slight_smile:

However, everytime the app resumes, the the webview reloads (and basically restarts the app). During the startapp, I can se the line “CDVWKWebViewEngine will reload WKWebView if required on resume” in the xcode console.

The reload happens every time (tried on several iphone models as well), and there was never any issues like this with the old webview.

Does anyone know anything about this and how to avoid it? I would HATE to have to go back to the old webview after seeing the difference it makes…

Odd fix for this is not let the <title> tag blank,
so fill in any values on the title tag on your index.html to fix this like:
<title>WkWebViewFix</title>