News for hackers. Stuff that matters.
Re:Show HN: cookies.js, making cookies a delight to work wit... by brian_herman on Thursday September 08, 2016 @02:38AM (#12450756)
This reminds me of jquery-cookie which was replaced by js-cookie. https://github.com/js-cookie/js-cookie
Re:Show HN: cookies.js, making cookies a delight to work wit... by franciscop on Thursday September 08, 2016 @02:52AM (#12450819)
Yes, 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