What are Cookies

A cookie is used to store a small piece of information on a client machine. A cookie contains page-specific information that a Web server sends to a client along with page output. Cookies are used for sending page-specific information because HTTP is a stateless protocol and cannot indicate whether page requests are coming from the same or different clients.

Cookies provide another way that you can store information for later use. Cookies are small files that are created on the client’s hard drive. One advantage of cookies is that they work transparently without the user being aware that information needs to be stored.

Cookies also can easily whether any page in your applications and even be retained between visits, which allows for truly login term storage. Some of the drawbacks that query strings, cookies stored limited to simple string information and easily accessible and readable if the user finds and opens the corresponding files.

Some user disables cookies on their browsers, which will cause problems for the web application that require them. Alos users might manually delete the cookie files stored on their hard drives but for that most part, cookies are widely adopted and used extensively on many Web sites.

Cookies can either be Temporary or  Persistent.

Temporary Cookies:

Temporary cookies also known as session cookies, exist in the memory space of browse. When the browser is closed all session cookies added to browse are lost.

Persistent Cookies: 

A Persistent cookie is saved as a text file in the file system of the client computer.

Advantages of using Cookies:

Limitations of Using Cookies

start a project with us