0
2.7kviews
Write a code in JavaScript to set a cookie.
1 Answer
0
88views

Cookie

  • Cookies are data, stored in small text files, on your computer.
  • JavaScript can create, read, and delete cookies with the document.cookie property.
  • With JavaScript, a cookie can be created like this: document.cookie = "username=abc xyz";
  • We can also add an expiry date (in UTC time) otherwise by default, the …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.