Sets a cookie given a valid URL and explicit user-provided cookie attributes.
The URL of the cookie to set.
The name of the cookie.
The domain of the cookie.
The path of the cookie (should be at least "/")
The value of the cookie.
If True the cookie is for HTTP protocol use only.
If True the cookie is for HTTPS use only.
The UTC expiration date of the cookie.
Sets a cookie given a valid URL and explicit user-provided cookie attributes.
Visual Basic |
---|
Public Sub SetCookie( _ ByVal url As String, _ ByVal CookieName As String, _ ByVal CookieDomain As String, _ ByVal CookiePath As String, _ ByVal CookieValue As String, _ ByVal CookieHttpOnly As Boolean, _ ByVal CookieSecure As Boolean, _ ByVal CookieExpirationDateUTC As String _ ) |
The URL of the cookie to set.
The name of the cookie.
The domain of the cookie.
The path of the cookie (should be at least "/")
The value of the cookie.
If True the cookie is for HTTP protocol use only.
If True the cookie is for HTTPS use only.
The UTC expiration date of the cookie.
Sets a cookie given a valid URL and explicit user-provided cookie attributes. This function expects each attribute to be well-formed. It will check for disallowed characters (e.g. the ';' character is disallowed within the cookie value attribute) and fail without setting the cookie if such characters are found.
You should flush cookies store before calling GetCookies.
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