I have my own segment control that loads predefined URLs into WKWebView. I want to achieve WKWebView cleanup (empty) between loads.
So, right before I removed the real request, I tried to download:
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"about:blank"]];
[wkWebView loadRequest:request];
I even tried to load some kind of empty HTML to no avail:
[wkWebView loadHTMLString:@"<html><body></body></html>" baseURL:[NSURL URLWithString:@"about:blank"]];
This works for UIWebView. Any tips on this?
source
share