Keep in mind localStorage and sessionStorage utilizing the Web Storage API is not the only way to utilize storage for your front-end web applications. However, it may be the easiest for beginners to get started with. I plan to create more tutorials for front-end storage solutions in the future. If you already use a solution, let me know what it is in the comments. Likewise, if this tutorial was helpful, let me know that and share. Thanks!
Hi Dave, amazing work time and time again. Do you have a video on the other ways to store data in the front end, or will you be doing one in the near future?
i literally first downloaded the video and watched the whole video being offline.. and i searched your video again , just came here to give this video a like for such amazing explanation .. thank you so much sir .. i am learning these concepts just because of you. thank you🥰🥰
you didn't say that your method logName hadn't been saved in storage even though it existed in the object... I just discovered it can't be done? how weird!
(12:15) Delving into localStorage for persistent data Just a small suggestion for enhancement: 1. Close the website window. 2. Stop the Live Server. 3. Comment out your entire JS file and save changes. 4. Restart the app using Live Server. 5. Navigate to the Browser's Application tab -> Local Storage, where you'll find your data persisting flawlessly. Aside from this minor improvement, Mr. Gray's content remains commendable, as always. Top-notch educational content. Always a pleasure to learn from him ❤
localStorage will store strings, so I also use JSON.stringify() when sending data to the store and JSON.parse() when getting data from the store. More on localStorage here: developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
That is a great question. I could make a new tutorial based on this question 😀. That said, you can learn how to do it from this article, too: hacks.mozilla.org/2012/02/saving-images-and-files-in-localstorage/