zimki | documentation | search
 
Zimki Documentation - zimki.cookie.set

Sets a cookie.

Example:

zimki.cookie.set('mycookie','my cookies value is foo');

zimki.cookie.set optionally takes a third parameter which is a duration string. Examples of valid duration strings are:

+30sIn 30 seconds
+10mIn 10 minutes
+2hIn 2 hours
nowWell, now
+3Min three months
+5Yin three years

For example:

zimki.cookie.set('mycookie','my cookies value is foo, and will expire in 10 minutes', '+10m');

Finally zimki.cookie.set can also take a third parameter which is a text path to limit the cookies validity to.

Parent

zimki.cookie