Mozilla.com


Table of contents
  1. 1. Method overview
  2. 2. Attributes
  3. 3. Methods
    1. 3.1. removeAll()
    2. 3.2. remove()
    3. 3.3. See also
Discuss in IRC

nsICookieManager

Table of contents
  1. 1. Method overview
  2. 2. Attributes
  3. 3. Methods
    1. 3.1. removeAll()
    2. 3.2. remove()
    3. 3.3. See also

The nsICookieManager interface is an optional interface for accessing or removing the cookies that are in the cookie list.

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/cookiemanager;1"].
            getService(Components.interfaces.nsICookieManager);


nsICookieManager is defined in netwerk/cookie/public/nsICookieManager.idl . It is scriptable and has been frozen since Mozilla 1.9 .

Inherits from: nsISupports

Method overview

void removeAll();
void remove(in AUTF8String aDomain, in ACString aName, in AUTF8String aPath, in boolean aBlocked);

Attributes

Attribute Type Description
enumerator nsISimpleEnumerator Called to enumerate through each cookie in the cookie list. The objects enumerated over are of type nsICookie. Read only.

Methods

removeAll()

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

 void removeAll();
Parameters

None.

remove()

This method is called to remove an individual cookie from the cookie list.

 void remove(
   in AUTF8String aDomain, 
   in ACString aName, 
   in AUTF8String aPath, 
   in boolean aBlocked
 );
Parameters
aDomain
The host or domain for which the cookie was set.
aName
The name specified in the cookie.
aPath
The path within the domain for which the cookie is valid.
aBlocked
Indicates if cookies from this host should be permanently blocked.

Page last modified 15:22, 22 May 2009 by Sheppy

Files (0)