-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to clear cache / history webview2 #299
Comments
Not sure if you don't want to cache to disk at all or just clear the cache. If you just want to clear the cache data you can try using the appropriate CallDevToolsProtocolMethod C++ or |
There is also a flag I've used in the past in chrome that lets you reduce the size of the cache. It won't let you totally stop caching but if you make the cache size very small almost nothing gets cached. More of a hack than a solution. CoreWebView2EnvironmentOptions options = new CoreWebView2EnvironmentOptions("--disk-cache-size=1 ");
Task<CoreWebView2Environment> task = CoreWebView2Environment.CreateAsync(null, cacheFolder, options); Maybe InPrivate mode support would be a good feature request. |
@michael-russin I agree. InPrivate mode is required. |
is there any way to add option to "disable context menu"?
context menu appear for a SECOND then goes off. |
When are you setting the WebView2 Source property or calling WebView2.Navigate? CoreWebView2Settings states setting changes made after NavigationStarting event will not apply until the next top level navigation. Maybe a navigation is starting before you disable the context menu. |
I used these methods, and both didn't work for me (Network.clearBrowserCache and Network.setCacheDisabled). But I am able to clear cookies(credential data) by using 'Network.clearBrowserCookies'. Is there any option to delete/disable cache or session data. I am really looking forward for an answer for this. |
Same here. I used _coreWebView2.CallDevToolsProtocolMethodAsync( "Network.setCacheDisabled", @"{""cacheDisabled"":true}" ); But cache still persisted. Do we have to do anything else? Best regards. PS: Could we get this through CoreWebView2Settings? |
Clearing cache and other browsing data is not supported through the profile: |
How to clear cache / history webview2?
I have a specific requirement not show the embedded Iframe history or in cache, which I can currently view under the "Cache" folder in the application installed directory created by the application.
AB#31044529
The text was updated successfully, but these errors were encountered: