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};
Top comments (0)