Best way to use LocalStorage in Javascript | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Best way to use LocalStorage in Javascript

just wonder the best way to use Localstorage function in javascript

9th Oct 2020, 7:46 AM
T1mun
T1mun - avatar
1 Answer
+ 2
🔥 To find Whether a use has visited your website for first time. 🔥 To store their name,email,number etc. 🔥 To store form data. 🔥 To store some variables for a long time. 🔥 It can store json data 🔥 I have also used this as a database 🔥 But its storage is about only 5mb to 10mb. 🔥 To store data even if the person left out the browser. Edit: you should not store personal data in localstorage or any PII for privacy reasons
9th Oct 2020, 8:27 AM
Arnav Kumar [Less/Not Active]
Arnav Kumar [Less/Not Active] - avatar