title: How to delete WKWebview 's Cache in iOS8?
body: <p>How to delete WKWebview 's Cache in iOS8? 
  For iOS 9 Below code was working.</p>
  
  <pre><code>let websiteDataTypes = NSSet(array: [WKWebsiteDataTypeDiskCache, WKWebsiteDataTypeMemoryCache, WKWebsiteDataTypeCookies])
              let date = NSDate(timeIntervalSince1970: 0)
  WKWebsiteDataStore.defaultDataStore().removeDataOfTypes(websiteDataTypes as! Set&lt;String&gt;, modifiedSince: date, completionHandler:{ })
  </code></pre>
  
  <p>For iOS 8, I tried solutions in following links, but Cache is not deleted. </p>
  
  <p><a href="https://github.com/ShingoFukuyama/WKWebViewTips#cookie-cache-credential-webkit-data-cannot-easily-delete" rel="nofollow noreferrer">https://github.com/ShingoFukuyama/WKWebViewTips#cookie-cache-credential-webkit-data-cannot-easily-delete</a></p>
  
  <p><a href="https://stackoverflow.com/questions/27105094/how-to-remove-cache-in-wkwebview">How to remove cache in WKWebview?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/27105269/remove-cache-in-wkwebview-objective-c">remove cache in wkwebview objective c</a></p>
  
  <p><a href="https://stackoverflow.com/questions/31289838/how-to-delete-wkwebview-cookies">How to delete WKWebview cookies</a></p>
  
  <p><a href="http://blogs.candoerz.com/question/128462/how-to-delete-wkwebview-cookies.aspx" rel="nofollow noreferrer">http://blogs.candoerz.com/question/128462/how-to-delete-wkwebview-cookies.aspx</a></p>
  
  <p><a href="http://atmarkplant.com/ios-wkwebview-tips/" rel="nofollow noreferrer">http://atmarkplant.com/ios-wkwebview-tips/</a></p>
  
  <p>I would appreciate your help.</p>