filamentgroup / Cookie
Licence: mit
Get, set, forget cookies!
Stars: ✭ 89
Programming Languages
javascript
184084 projects - #8 most used programming language
cookie function
Get, set, or forget cookies.
- [c]2014 @scottjehl, Filament Group, Inc.
- Licensed MIT
Based on code examples found at:
- http://stackoverflow.com/posts/15724300/revisions by stackoverflow user kirlich
- http://www.quirksmode.org/js/cookies.html by PPK
API
To get a cookie, pass only a name. It'll return null
if undefined.
cookie( "foo" );
To set a cookie, pass a name, a string value, and optionally a number of days until the cookie expires
cookie( "foo", "bar", 5 );
To delete a cookie, pass a name, and a false
value
cookie( "foo", false );
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].