nsICookieManager2

IID:3E73FF5F-154E-494f-B640-3C654BA2CC2B
Inherits From:nsICookieManager

Additions to the frozen nsICookieManager

This interface is implemented by the following components:


Methods

[noscript] void add ( AUTF8String domain , AUTF8String path , ACString name , ACString value , PRBool secure , PRBool isSession , PRInt64 expiry ) PRBool findMatchingCookie ( nsICookie2 cookie , out PRUint32 countFromHost )

void add ( AUTF8String domain , AUTF8String path , ACString name , ACString value , PRBool secure , PRBool isSession , PRInt64 expiry )

Add a cookie. nsICookieService is the normal way to do this. This method is something of a backdoor.

Arguments:
domain: the host or domain for which the cookie is set. presence of a leading dot indicates a domain cookie; otherwise, the cookie is treated as a non-domain cookie. see RFC2109.
path: path within the domain for which the cookie is valid
name: cookie name
value: cookie data
secure: true if the cookie should only be sent over a secure connection.
isSession: true if the cookie should exist for the current session only.
expiry: expiration date, in seconds since the epoch. only relevant if isSession is false.

PRBool findMatchingCookie ( nsICookie2 cookie , out PRUint32 countFromHost )

Find whether a matching cookie already exists, and how many cookies a given host has already set. This is useful when e.g. prompting the user whether to accept a given cookie.

Arguments:
cookie: the cookie to look for
countFromHost: the number of cookies found whose hosts are the same as, or subdomains of, the host field of cookie
Returns:
true if a cookie was found which matches the host, path, and name fields of aCookie

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com