A set of generic methods for getting and setting cookies.
Creates a new cookie.
setCookie('allowCookies', 'yes', 365);
Returns the requested cookie if exists, or empty.
getCookie( 'allowCookies' );
Deletes the requested cookie; returns the deleted cookie if successful, or returns false.
deleteCookie( 'allowCookies' );
Checks whether a given cookie exists; returns the cookie if found, else returns false.
checkCookie( 'allowCookies' );
Open the index.html
file for a sample implementation.