Enter the cookie you want to set, get or delete in the input box and press RETURN

You also can click the btn the bottom to test the how many cookies you can store in this browser

Set Cookie
show code
function setCookie(name, value, time) {
    //Expiration time
    let t = new Date();

    t.setSeconds(t.getSeconds() + parseInt(time));
    document.cookie = `${eacape(name)}=${escape(value)};expires=${t.toGMTString()};`;
}
Get Cookie
show code
function GetCookie(name) {
    let reg = new RegExp(`(^| )${escape(name)}=([^;]*)(;|$)`);
    let arr = document.cookie.match(reg);

    if (arr) {
        return unescape(arr[2]);
    } else {
        alert ('Not Found');
    }
}
Delete Cookie
show code
function DelCookie(name) {
    let t = new Date();
    t.setTime(-1);

    let c;

    if (c = GetCookie(name)) {
        document.cookie = `${escape(name)}=;expires=${t.toGMTString()};`;
        d.value = '';
        alert ('Delete Success !');
    }
}
Maximum number of cookies to store