Have you ever thought how to use LocalStorage for some purpose in your project?
This is a super old topic but anyways I want to give my input on it. Well is not complicated at all, there are some considerations to take but is not hard to use.
First of all, you need to know that there are
localStorage the differences between them are the following if you want the data to be maintained only until the browser window closes you use sessionStorage but if you want to keep your data and remove it when you want then you can use localStorage.
To create your first local storage use
If you read out the myColor key using
let color = localStorage.getItem('myColor'); // -> "blue"
Then you can remove it whenever you want using
localStorage.removeItem('myColor'); const myColor = localStorage.getItem('myColor'); // -> null
Well you are good to go,
Thanks for reading, see you in the next chapter!