Avoid DOM flash during DOM render

iOS WKWebView shows flashes between full-page navigations. I guess it unloads the previous page’s DOM, shows the background of the web view, then renders the new page.

Safari (unfairly) does not have this issue.

Does anyone know how to avoid this flash?

Not sure how you are developing your app, but if it is an SPA, there shouldn’t be full page reloads. If you are using Ionic, it keeps previous pages in the DOM so it feels more like a native app. See Vue Lifecycle | Ionic Framework.