How to clear cookies of the webbrowser widget plugin

I’m trying to make it clear that every time the game is opened it clears all cookies from the webbrowser widget plugin, but there’s no use.

Code: FBrowserContextSettings browserContextSettings(“myID”); browserContextSettings.bIgnoreCertificateErrors = true; browserContextSettings.bPersistSessionCookies = false; browserContextSettings.CookieStorageLocation = ServerEnvironment.BrowserCacheLocation; FCreateBrowserWindowSettings webBrowserSettings; webBrowserSettings.bUseTransparency = false; webBrowserSettings.Context = browserContextSettings;

  1. TSharedPtr<IWebBrowserWindow> browserSP = IWebBrowserModule::Get().GetSingleton()->CreateBrowserWindow(webBrowserSettings);
  2. TSharedPtr<SWebBrowser> browserWidget;
  3. browserWidget = SAssignNew(browserWidget, SWebBrowser, browserSP)
  4. .ViewportSize(FVector2D(GEngine->GameViewport->Viewport->GetSizeXY()))
  5. .ShowControls(false)
  6. .ShowAddressBar(false)
  7. .OnUrlChanged(BIND_UOBJECT_DELEGATE(FOnTextChanged, OnBrowserUrlChanged));
  8. GEngine->GameViewport->AddViewportWidgetContent(browserWidget.ToSharedRef());

After I’m done I try to clear my cookies like this: Code: TSharedPtr cookieMan = IWebBrowserModule::Get().GetSingleton()->GetCookieManager(); cookieMan->DeleteCookies("", “”); In the IWebBrowserCookieManager.h it says: Removes all matching cookies. Leave both URL and CookieName blank to delete the entire cookie database. The actual deletion will be scheduled on the browser IO thread, so the operation may not have completed when the function returns. Why are my cookies not cleared? Is this a bug?

i also tryed it too:

i’ve tryed it but didn´t work: IWebBrowserCookieManager::DeleteCookies | Unreal Engine Documentation

Any help would be appreciated.

any help? ?

? ?

Hey I am looking for the answer as well…
I will try my best to do some researches, hope I could help if you are sitill looking for the answer. :grinning: