Get 2GB of free storage at PersonalGrid

Cookie

Programmer friendly JavaScript cookie API.

Cookie provides a more humane wrapper for reading and writing JavaScript cookies. All cookies set are relative to the current domain.

Example


		Cookie.get('key'); //null
		Cookie.set('key','value');
		Cookie.get('key'); //'value'
		Cookie.unset('key');
		Cookie.get('key'); //null

		Cookie.observe('get',function(key){
			console.log('Attempting to read Cookie key: ' + key);
		});
	

Class

ReturnNameDescription
mixedget(string name)Returns null if the value was not found.
nullset(string name, mixed value [,number seconds_to_expiry])
mixedunset(string name)Returns null if the value was not found.

Events

NameDescription
get(string name)
set(string name, mixed value)
unset(string name)