I'm trying to develop a html5 mobile web application using the sencha touch. I need to save client's data in browser storage for a long time. At first i used a localstorage to save them. But my colleague recommended to use cookies instead of the localstorage. I need to warn you that i don't use user's data in server-side and size of data is small. What should i use localstorage or cookies in this case?
Asked
Active
Viewed 1,675 times
1 Answers
2
I think in this situation local Storage would do better,because
- Cookies are used by server side and you said ,you don't use users's data in server side.
- Your data size is small and you need to store it for long time,cookie has expiration date,but with local storage there is no such,either you have remove it programmatic-ally using java script or by clearing browser cache.

dReAmEr
- 6,986
- 7
- 36
- 63