vegUI.org home of the javascript based window manager and AJAX framework

VegUISiteKit: Cookie Functions

This library holds functions to set, read and erase cookies. Additionally there is also a function that retrieves all cookies and returns them as a list in object form.

Demonstration

Code: Javascript

/* set a cookie (60 minutes validity time) */

vsk_cookie_set('mycookie', 'some text', 1000*60*60);

/* retrieve cookie */

var d = vsk_cookie_get('mycookie');

/* erase cookie */

vsk_cookie_unset('mycookie');

/* get cookie list object */

var l = vsk_cookie_list();
alert(l.mycookie);

Dependencies

none

Download

This package contains the code in both commented and compressed forms. The compressed version has had it's comments and unnecessary whitespace removed in order to reduce it's size.

download version
tar.gz (2,2 KB),
zip (4,6 KB)
0.1.0 (beta)

Tutorials on using this library

BETA notice

While this library is in BETA phase YOU can help get it out of there quicker by submitting any bugs you may find to the bug database. Thanks for helping ;)

Changelog

2007-03-12 - vegu@vegui.org
  version 0.1.0