Tuesday, October 13, 2009

Explain the limitation & issues with the Cookies

Limitation & Issues with Cookies
Using cookies gives you excellent state management capabilities, as they are simple to implement, and they help you move resources off the server. Like almost any particular technique, cookies have some limitations.

Some Users Dont Allow Cookies
Some users believe that viruses can be sent in a cookie and will not allow them onto their computers. Although there have never been any documented cases of this happening, and no one could realistically send a virus through a cookie, a lot of users still turn off the ability to accept cookies. When this happens, the user will not be able to use your site if you use cookies for managing state.

Performance Can Deteriorate
Imagine that a user walks through a wizard on your site, as you gather 100 pieces of data from that user over several pages. Each page needs to post gathered data to the server. If you wait until all 100 pieces of data are gathered, you need to store that data somewhere in the meantime. If you keep putting data into a cookie, there is a lot of data being sent back and forth between the browser and the server. This will eat up a lot of bandwidth and could slow your whole site down. Remember, the data has to go both ways for each page the users hit on your site.

Cookies Take Up Memory
Some browsers impose a limit on the size of the cookie data they can accept, or the number of cookies they can accept at one time. In addition, the amount of memory that you may chew up on the users machine may cause their operating system to swap some memory to disk. Under this circumstance, the cookie has slowed down your users machine as well as the server.

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home