Summary
LocalStorage is one of the Web Storage APIs that allows you to store data persistently in the user's browser. Unlike'sessionStorage', which stores data until the browser tab is closed, 'localStorage' keeps data until it is explicitly removed.
Most browsers allow you to store up to 5MB of data in localStorage. It is therefore good practice to check that it is available before attempting to use it.