What is difference between session storage and local storage?

Solution

Local storage provides two objects for storage: 

  • window.localStorage
  • window.sessionStorage 

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.

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media