Add a removeData function
This function will clear the specified data from the WKWebView. You call the function with an array of the types you want to remove:
this.webView.removeData([ WebsiteDataTypes.DiskCache, WebsiteDataTypes.OfflineWebApplicationCache, WebsiteDataTypes.MemoryCache, WebsiteDataTypes.LocalStorage, WebsiteDataTypes.Cookies, WebsiteDataTypes.SessionStorage, WebsiteDataTypes.IndexedDBDatabases, WebsiteDataTypes.WebSQLDatabases, ])
WebsiteDataTypes is now exported from the module, so you include:
import WKWebView, { WebsiteDataTypes } from 'react-native-wkwebview-reborn'
If you pass null for the array then all data types are removed.
Any thoughts on merging this change? It would be great not to have a fork just for this one issue.
Thanks.
Hey @markdaws, nice work!
Would love to see this merged as well. Such a great feature to have for us privacy minded users. 😇