Interface nsICookieType

Hierarchy

Properties

creationTime: int64_t

the creation time of the cookie, in microseconds since midnight (00:00:00), January 1, 1970 UTC.

expires: uint64_t

DEPRECATED

use nsICookie.expiry and nsICookie.isSession instead.

expiration time in seconds since midnight (00:00:00), January 1, 1970 UTC. expires = 0 represents a session cookie. expires = 1 represents an expiration time earlier than Jan 1, 1970.

expiry: int64_t

the actual expiry time of the cookie, in seconds since midnight (00:00:00), January 1, 1970 UTC.

this is distinct from nsICookie::expires, which has different and obsolete semantics.

host: string

the host (possibly fully qualified) of the cookie

isDomain: boolean

true if the cookie is a domain cookie, false otherwise

isHttpOnly: boolean

true if the cookie is an http only cookie

isSecure: boolean

true if the cookie was transmitted over ssl, false otherwise

isSession: boolean

true if the cookie is a session cookie. note that expiry time will also be honored for session cookies (see below); thus, whichever is the more restrictive of the two will take effect.

lastAccessed: int64_t

the last time the cookie was accessed (i.e. created, modified, or read by the server), in microseconds since midnight (00:00:00), January 1, 1970 UTC.

note that this time may be approximate.

name: string

the name of the cookie

originAttributes: any

The origin attributes for this cookie

path: string

the path pertaining to the cookie

rawHost: string

the host (possibly fully qualified) of the cookie, without a leading dot to represent if it is a domain cookie.

sameSite: int32_t

the SameSite attribute; this controls the cookie behavior for cross-site requests as per https://tools.ietf.org/html/draft-west-first-party-cookies-07

This should be one of:

  • SAMESITE_NONE - the SameSite attribute is not present
  • SAMESITE_LAX - the SameSite attribute is present, but not strict
  • SAMESITE_STRICT - the SameSite attribute is present and strict
schemeMap: nsICookie_schemeType

Bitmap of schemes.

value: string

the cookie value

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Returns const_Cookie

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

Generated using TypeDoc