I am trying to figure out how to restore the back forward list in a WKWebView. Apple defaults the BackForwardList to be readonly. However, FireFox, Chrome, and other mobile browsers are able to restore it each session.
This is how FireFox restores it on iOS: https://github.com/mozilla-mobile/firefox-ios/wiki/History-Restoration-in-WKWebView-(and-Error-Pages)
Here is the JS/HTML code that's used to access the DOM History API: https://github.com/mozilla-mobile/firefox-ios/blob/041c85483b1aa4a4e357d8bd9419550e4f20347a/Client/Assets/SessionRestore.html
In order to load this file and restore a WKWebView's history, do you need to spin up a local server within the app?
It seems like you would need to in order to access a local:// url that points to this JS file.