The cookie property

The cookie property is used to store information for the viewer.
A cookie is a small text file saved to viewer’s computer for a certain amount of time.
With the use of cookies a site can remember and retrieve information for viewer (the content of a shopping cart, settings, etc).

document.cookie = string;

You have to replace the word string with the text string that contains information you want to use.

document.cookie = "site = homepage"

Leave a Reply