Announcement

Collapse
No announcement yet.

How to clear cookies of the webbrowser widget plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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: https://docs.unrealengine.com/en-US/...ies/index.html

    Any help would be appreciated.

    #2
    any help? ?
    Last edited by TheSubZer0; 03-04-2020, 07:15 PM.

    Comment


      #3
      ? ?

      Comment

      Working...
      X