【发布时间】:2015-07-01 21:54:01
【问题描述】:
如何在 Chromium 中设置或更改 cookie 值?
这不起作用:
CookieManager := TCefCookieManagerRef.Global;
CookieManager.VisitAllCookiesProc(
function(const name, Value, domain, path: ustring;
secure, httponly, hasExpires: Boolean; const creation, lastAccess,
expires: TDateTime; Count, total: Integer;
out deleteCookie: Boolean): Boolean
begin
deleteCookie := False;
ShowMessage(name + ': ' + Value);
CookieManager.SetCookie('', name, Value + 'aaaa', domain, path, secure,
httponly, hasExpires, creation, lastAccess, expires);
Result := True;
end);
【问题讨论】:
-
怎么不工作?会发生什么?
-
当我再次运行它时,值没有改变。应在值中添加“aaa”。非常感谢。
标签: delphi cookies components chromium