These are the resources I used:
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
https://www.w3schools.com/js/
https://en.wikipedia.org/wiki/HTTP_cookie