Storage

Localstorage allows us to store and remember data in the users' browser. The data is persistent and will stay in place, even after closing and reopening the browser.

Examples are storing user preferences like language choice, dark/light mode preferences, shopping cart items, ... but more complex data can also be stored.

Resources

Videos

Mozilla Developer Network

Instructions

Read the instructions in topics/storage.starter.js

1 - store your name

Click the button to store your name to localstorage

2 - load your name

Click the button to load your name from localstorage

...

3 - remove your name

Click the button to remove your name completely from localstorage

4 - Add movies

Click the button to add a movie to your collection and make sure to load your movies when your page refreshes.

  • List movies here