DEV Community

Calvin
Calvin

Posted on

🎥 Video Snippets: [3 => Cookies] 🍪

At its core, a cookie is a name-value pair. We can do several things with cookies. From determining when the cookie can expire to whether the cookies can be sent along with certain user requests to different domains, there are many possibilities.

A cookie can be set with one line of code:

document.cookie= ${key}=${value};

Source: Smart Understanding Browser Cookies

Top comments (0)