如何使用PHP或JS使用HttpOnly删除cookie
我有一个包含这些参数的COOKIE:
Name: workgroup_session_id Content: "" Domain: agrobman1.tsi.lan Path: / Send for: Any kind of connection Accessible to script: No (HttpOnly) Created: Wednesday, November 4, 2015 at 9:31:58 AM Expires: When the browsing session ends
我试图使用此代码使用PHP删除COOKIE:
setCOOKIE("workgroup_session_id", "\"\"", time() - 3600, "/", "agrobman1.tsi.lan", false, true);
但我仍然无法删除它.有谁知道如何使用PHP或JS删除此类型的COOKIE?
1> Andrew..:
你不能用Javascript删除客户端的HttpOnly COOKIE,正如这篇文章指出的那样.Neta指出,它必须在服务器端完成.
PHP之友评论