You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is old code but check if it's good for whenever nonPersistent is not an option:
// https://gist.github.com/insidegui/4a5de215a920885e0f36294d51263a15HTTPCookieStorage.shared.removeCookies(since:Date.distantPast)WKWebsiteDataStore.default().fetchDataRecords(ofTypes:WKWebsiteDataStore.allWebsiteDataTypes()){ records in
records.forEach{ record inWKWebsiteDataStore.default().removeData(ofTypes: record.dataTypes, for:[record], completionHandler:{})print("Cookie ::: \(record) deleted")}}
MSTG-Platform-10: A WebView's cache, storage, and loaded resources (JavaScript, etc.) should be cleared before the WebView is destroyed.
Maybe include to do the cleanup when a webview has hung? https://developer.android.com/about/versions/10/features#webview-hung
Research notes for iOS
Check WebView Config / init for params/functions preventing files from being stored in the first place
One option is to use WKWebsiteDataStore.nonPersistent(). Example here:
https://github.com/duckduckgo/iOS/blob/cb600c312c1c9884f72d0cffe00318dd0de9faab/Core/WKWebViewConfigurationExtension.swift
This is old code but check if it's good for whenever nonPersistent is not an option:
More useful linnks for the research:
The text was updated successfully, but these errors were encountered: