LocalStorage and sessionStorage are a part of Web Storage API. It provides a way to store key/value pairs in the browser. It won’t disappear after refreshing the page. Both localStorage and sessionStorage are an instance of the Storage object….
Source: https://wanago.io/2018/06/11/web-storage-api-localstorage-and-sessionstorage/