Cookies is the term used to describe a type of message that is given to a web browser by a web server. Its main purpose is to identify users and prepare customized web pages or to save site login information for you.
When someone enters a website using cookies, they will be asked to fill out a form providing personal information; like name, email address, and interests. This information is packaged into a cookie and sent to the web browser, which then stores the information for later use. The next time the user go to the same website, their browser will send the cookie to the web server. The message is then sent back to the server each time the browser requests a page from the server.
A web server has no memory so the hosted website the user is visiting transfers a cookie file of the browser on their computer’s hard disk so that the site can remember who they were and their preferences. This exchange of messages allows the web server to use this information to present the users with customized web pages. For example, instead of seeing just a generic welcome page, the user might see a welcome page with their name on it.
Types of Cookies
Also called a transient cookie, it is a cookie that is erased when users close the web browser. It is stored in temporary memory and is not retained after the browser is closed. Session cookies do not collect information from the user’s computer. They typically store information in the form of a session identification that does not personally identify the user
Also called a permanent cookie, or a stored cookie. It is stored on user’s hard drive until it expires (persistent cookies are set with expiration dates) or until they delete the cookie. These cookies are used to collect identifying information about the user, such as web surfing behavior or user preferences for a specific web site.