by Shukant Pal
How to wrap your head around the cookie object
Book-keeping with your sweet cookie!
The document.cookie property allows you to store a string that will persist data across page reloads and different pages in the same domain! You can use it to save your user’s preferences without uploading them on your server.