VocabularyhttpClass descriptionAn HTTP cookie.
Instances contain a number of slots which correspond exactly to the fields of a cookie in the cookie specification:
name | The cookie name, a string |
value | The cookie value, an object supported by present |
comment | A string |
path | The pathname prefix where the cookie is valid, a string |
domain | The domain name where the cookie is valid, a string |
expires | The expiry time, a timestamp or f for a session cookie |
max-age | The expiry duration, a duration or f for a session cookie |
http-only | If set to a true value, JavaScript code cannot see the cookie |
secure | If set to a true value, the cookie is only sent for https protocol connections |
Only one of
expires and
max-age can be set; the latter is preferred and is supported by all modern browsers.
Definition