3

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?

user3555529
  • 55
  • 1
  • 5

1 Answers1

2

I think in this situation local Storage would do better,because

  1. Cookies are used by server side and you said ,you don't use users's data in server side.
  2. 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