The browser has a so-called local storage
that allows you to store data between user visits
to the site (5
-10
megabytes of
information).
Data is accessed by a key: you store data with some key, and then you can retrieve it by that key or delete it. It is allowed to save only strings. There are special methods for working with data. Let's consider them.
Two types of storages are used for data
storage: sessionStorage
and
localStorage
. The first stores
data only until the browser is closed,
and the second always.
In the next lessons we will deal with the possibilities of the local storage.