by Dinesh Thakur Category: Session And Cookies

Cookies enable you to store the session information on the client side which has the following advantages,

Persistence: One of the most powerful aspects of cookies is their persistence. When a cookie is set on the client's browser, it can persist for days, months or even years. This makes it easy to save user preferences and visit information and to keep this information available every time the user returns to your site. Moreover, as cookies are stored on the client's hard disk so if the server crashes they are still available.

Transparent: Cookies work transparently without the user being aware that information needs to be stored.

• They lighten the load on the server's memory.

 Disadvantages of Cookies

The following are the disadvantages of cookies :

• Sometimes clients disable cookies on their browsers in response to security or privacy worries which will cause problem for web applications that require them.

• Individual cookie can contain a very limited amount of information (not more than 4 kb).

• Cookies are limited to simple string information. They cannot store complex information.

• Cookies are easily accessible and readable if the user finds and reopens.

• Most browsers restrict the number of cookies that can be set by a single domain to not more than20 cookies (except Internet Explorer). If you attempt to set more than 20 cookies, the oldest cookies are automatically deleted.



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.