+ 1

Local storage vs. Cookies

What is the difference betwen them, and when to use local storage or cookies?

26th Oct 2017, 11:49 AM
Andrei Dan
Andrei Dan - avatar
1 Answer
+ 8
The main differences: localStorage : + not (automatically) shared with server side + more space allowed to store data (still limited but newer: about mega-octets) + sometimes still unsupported cookies: + shared with server side at each query + very less space allowed to store data (older: about kilo-octets) + widely supported Both aren't supported in any 'webview' android context (ie: in app' html viewer), only in web browsers... When to use depends of your needs, according to their subtil differences ;P
26th Oct 2017, 11:59 AM
visph
visph - avatar