What is Cookies?


HTTP is a stateless protocol. It does not provide any means to detect whether two request originate from the same browser. A cookie is information that a Web Site puts on your hard disk so that it can remember something about you at a later time .A cookie can be defined as a small amount of information that server store on a browser .The main purpose of the cookie is to maintain personal information of the client within the client system. 

Typically, a cookie records your preferences when using a particular site. Using the Web's Hypertext Transfer Protocol (HTTP), each request for a Web page is independent of all other requests. For this reason, the Web page server has no memory of what pages it has sent to a user previously or anything about your previous visits. A cookie is a mechanism that allows the server to store its own information about a user on the user's own computer. You can view the cookies that have been stored on your hard disk (although the content stored in each cookie may not make much sense to you). The location of the cookies depends on the browser. Internet Explorer stores each cookie as a separate file under a Windows subdirectory. Netscape stores all cookies in a single cookies.txt file. 

Cookies can be categorized into two types: 
  1. Session Cookies
  2. Persistent Cookies