3 ms·
This reminds me of jquery-cookie which was replaced by js-cookie. https://github.com/js-cookie/js-cookie https://github.com/js-cookie/js-cookie
by brian_herman 10y ago
This reminds me of jquery-cookie which was replaced by js-cookie. https://github.com/js-cookie/js-cookie https://github.com/js-cookie/js-cookie
- franciscop 10y agoYes, after the initial simple version, when I thought of expanding it, I looked into js-cookie and Cookies [1], but they all seem to require a `.set()` and `.get()` methods which I find too verbose for something so simple. A couple more of differences: - I just added a CDN to cookies.js - The default is a 100-day cookie, as cookies for me imply long-lived cookies, not sessions. - The default is that if you visit `https`, it will require secure connection. - [configurable] to remove a cookie you can just null-ify it. [1] https://github.com/ScottHamper/Cookies https://github.com/ScottHamper/Cookies