Skip to content

moritzschramm/cookie.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Include the js file like this: <script src="path/to/cookie.js"></script> Now you can use any of the 3 functions below

setCookie([string] key, [string] value, [int] expires)

sets a cookie which expires after 'expires' days

getCookie([string] key)

retrieves value of a cookie; returns an empty string if the key is not set

checkCookie([string] key)

returns true if the key exists; otherwise false

deleteCookie([string] key)

deletes a cookie and returns true if the cookie existed; otherwise false

About

Simple js script that makes creating cookies easy

Topics

Resources

Stars

Watchers

Forks