API-Version: 1.9

Cookie

A cookie

Constructs a new cookie

Since:
  • 1.5
Source:
Returns:

Cookie

Members

domain :String

The cookie domain

Since:
  • 1.5
Source:

<readonly> expires :Date

The cookie expiration time

Since:
  • 1.5
Source:

httpOnly :String

If the cookie should not be exposed to scripts

Since:
  • 1.5
Source:

name :String

The cookie name

Since:
  • 1.5
Source:

path :String

The cookie path

Since:
  • 1.5
Source:

secure :boolean

If the cookie should only be transferred over ssl

Since:
  • 1.5
Source:

value :String

The cookie value

Since:
  • 1.5
Source:

Methods

delete()

Deletes the cookie from the jar

Since:
  • 1.5
Source:

save()

Saves the cookie to the jar

Since:
  • 1.5
Source:

setMaxAge(seconds)

Sets the maximum age of a cookie

Parameters:
Name Type Description
seconds Number

The number of seconds until the cookie expires, if set to -1 it is a session cookie

Since:
  • 1.5
Source: