What is difference between session storage and local storage?
Local storage provides two objects for storage:
The data stored in localStorage has no expiration set and lasts even after the browser is closed and reopened whereas data stored in
sessionStorage gets cleared when the page session ends. A page session lasts for as long as the browser is open and survives over page reloads and restores.