Cookies are a text file which is sent by the server to a client and stored by the client’s machine. They can then be retrieved by the server every time the client returns to the site. Cookies can only be viewed by the site that set them. They are usually used to maintain information about the users, such as their preferences.
While cookies are a good way to store the data, they are subject to the user allowing them. Also the user can delete them eliminating the data which was stored in them so it is best not to rely solely on cookies. There is also a security risk with cookies, do to them being just a plain text document. Also since the cookies are just stored on the computer it is possible for a different user to access the site and have the cookie information be incorrect.
