I am using a wkwebview to display a URL, I need the site data and cache to deleted or not to save cache at all. I need it to load up a fresh page each time. I have tried several methods but none work.
@IBOutlet weak var webView: WKWebView!
@IBOutlet weak var searchBar: UISearchBar!
override func viewDidLoad() {
super.viewDidLoad()
searchBar.backgroundImage = UIImage() // removes border
let myURL = URL(string: "https://myURL.com")!
let myRequest = URLRequest(url: myURL)
webView.load(myRequest)
}
}