nsICookieManager 编辑

An optional interface for accessing or removing the cookies that are in the cookie list.

netwerk/cookie/nsICookieManager.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.7

Inherits from: nsISupports

This interface is intended to be used as a service. It is implemented by the @mozilla.org/cookiemanager;1 component, but should generally be accessed via Services.cookies

Method overview

void remove(in AUTF8String aHost, in ACString aName, in AUTF8String aPath,in boolean aBlocked, in  jsval  aOriginAttributes);
void removeAll();

Attributes

AttributeTypeDescription
enumeratornsISimpleEnumeratorCalled to enumerate through each cookie in the cookie list. The objects enumerated over are of type nsICookie. Read only.

Methods

remove()

This method is called to remove an individual cookie from the cookie list, specified by host, name, and path. If the cookie cannot be found, no exception is thrown. Typically, the arguments to this method will be obtained directly from the desired nsICookie object.

void remove(
  in AUTF8String aHost,
  in ACString aName,
  in AUTF8String aPath,
  in boolean aBlocked,
  in jsval aOriginAttributes
);
Parameters
aHost
The host or domain for which the cookie was set. See nsICookieManager2.add() for a description of acceptable host strings. If the target cookie is a domain cookie, a leading dot must be present.
aName
The name specified in the cookie.
aPath
The path for which the cookie was set.
aBlocked
Indicates if cookies from this host should be permanently blocked.
aOriginAttributes
The originAttributes of this cookie.

removeAll()

This method is called to remove all cookies from the cookie list.

void removeAll();
Parameters

None.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:29 次

字数:4398

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文