The ability to understand the objects within the Javascript language definition provides web developers with an abundant source of utility objects.
Cookies are objects that are stored on the client side of a web connection.
Any data can be stored in a cookie, and each cookie is associated with a particular web page or entire web site. The data stored in a cookie is automatically transferred between a client web browser and web server. Cookies are often used in storing information about the client such as number of visits, favorite web page in a site, and even usernames and passwords. Cookies are implemented by accessing the cookie property in a Document object. The cookie property is a string, in which information can be read, or written.