localStorage
property allows you to access a local Storage
object. localStorage
is similar to sessionStorage
. The only difference is that, while data stored in localStorage
has no expiration time, data stored in sessionStorage
gets cleared when the browsing session ends—that is, when the browser is closed.