mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / DeleteCookies Method

The URL for which cookies will be deleted.

The name of the cookie to be deleted.

In This Topic
    DeleteCookies Method
    In This Topic
    Description

    Delete cookies.

    Syntax
    Visual Basic
    Public Sub DeleteCookies( _
       ByVal url As String, _
       ByVal CookieName As String _
    ) 
    Parameters
    url

    The URL for which cookies will be deleted.

    CookieName

    The name of the cookie to be deleted.

    Remarks

    Delete all cookies that match the specified parameters.

    • If both URL and CookieName values are specified all host and domain cookies matching both will be deleted.
    • If only URL is specified all host cookies (but not domain cookies) irrespective of path will be deleted.
    • If URL is empty all cookies for all hosts and domains will be deleted.
    Example
    Private Sub wxDesigner_OnCreate(ByVal Settings As WebKitXCEF3Lib.ISettings, CommandLineSwitches As String)
        
        Settings.persist_session_cookies = 1
        Settings.persist_user_preferences = 1
        Settings.cache_path = App.Path + "\Cache"
        Settings.local_storage = True
        
    End Sub
    
    Private Sub wxDesigner_OnPageComplete(ByVal URL As String)
        
        Dim Cookies As Variant
        Cookies = wxDesigner.GetCookies("webkitx.com")
       
        wxDesigner.SetCookie "https://www.webkitx.com", "test", "webkitx.com", "/", "test_value", True, True, DateAdd("yyyy", 1, Date)
        
        wxDesigner.DeleteCookies "https://www.webkitx.com", "test"
        
        wxDesigner.FlushCookiesStore
    
    End Sub
    See Also