Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: