I found a few topics about using localStorage, saving things between sessions, setting and getting items from the data, and other things, and I’m still really confused. Can somebody help break it down for me?
localStorage
it’s to store the user’s data on his side and won’t be removed once the tab/browser is closed.
localStorage.setItem("name", var)
is to set or add an item/data to that local storage.
localStorage.getItem("name")
is for getting the local storage item/data
localStorage.removeItem("name")
is to remove an item/data in that local storage
localStorage.clear()
is for removing all the local storage item/data
Example
save & load data.wick (3.5 KB)
save & load data.html (2.0 MB)
3 Likes
Thanks for the help, I’ll experiment with it a bit more.