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:
+30s | In 30 seconds |
+10m | In 10 minutes |
+2h | In 2 hours |
now | Well, now |
+3M | in three months |
+5Y | in 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
|