I'd like to clear the back forward list of a WKWebView
when the user taps a button.
I can't find anything useful in Apple documentation but I found the same question related to UIWebView
: How to clear back forward list in UIWebview on iPhone?
Unfortunately, I don't really like the given answers as they are either risky considering the app review process or they just don't work. So I was wondering if there was something new with WKWebView
that could help me to achieve that. I'm kind of hopeless as it's been a while now that I'm looking for a solution but we never know...
Dirty workaround
For now, I reinitialise my WKWebView ( myWebView = WKWebView() ) and I redefine its constraints ( as they are, of course, broken when I reinitialise the web view ).
What I don't really like here is that I reinitialise the whole web view whereas I just want to clear its back forward list.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With