In web application when a developer wants to store anything for user to use it again, he thinks of two ways: one is the client side and the other is the server side. The server storage is a good solution if we think about large data but if we want our application to work offline there is no way to manipulate server data without using client side storage.
So, for small amount of data that needs to stay at the client side where poor solutions are present like cookies, userData – IE special object, Google gears. The last two are browser specific which means they will not work in any browser, while cookies work in all browsers it suffers from serious limitations like:
- Small size, up to 4kb per cookie and 20 cookies accepted from a particular server or domain.
- It may be cleaned by user.
- Consumes bandwidth, because it is included in every request header.