Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

[JS] Cookie

Sven Eberth edited this page Jul 26, 2017 · 1 revision

Handle cookies very easy with the cookie namespace

Index

cookie.writeCookie

Create or update a cookie

cookie.writeCookie (name, value, expires, path, domain)

Parameters

name (string)
Representing the name of the cookie

value (string)
Representing the value of the cookie

expires (int)
Optional. Representing the expiration date in days of the cookie (e.g. 7 means in one week)

path (string)
Optional. The path gives you the chance to specify a directory where the cookie is active

domain (string)
Optional. Tells the browser to which domain the cookie should be sent

cookie.getCookie

get the value of a cookie

cookie.getCookie (name)

Parameters

name (string)
Representing the name of the desired cookie

cookie.deleteCookie

delete a cookie

cookie.deleteCookie (name)

Parameters

name (string)
Representing the name of the to be deleted cookie

Mausbrand objects

Clone this wiki locally