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?
Answer
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.
No comments:
Post a Comment