Tuesday, 1 April 2014

HTML5 LocalStorage vs Cookies?

Cookies are having limited Storage Capacity upto 4096 Bytes.
Local Storage is having capacity to store data upto 5MB

Using Local Storage we no need to parse a string to get data. Instead you can make a call for the variable name and it's value is returned. The same applies with creating and deleting data as well.

Local Storage Is not sent with every HTTP request.
Cookies are sent with every HTTP request.

Each domain stores all its cookies in a single string, which can make parsing data difficult.

No comments:

Post a Comment

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.