Dira.zapisi

Актуальные вопросы

Как очистить Session Storage?

' const textFromStorage = localStorage. getItem('my-key'); Both methods require you to pass a string (here: 'my-key' ) which identifies the stored value in the local storage.

We can get specified session storage using the getItem() method. We can clear the session storage by using the clear() method.

sessionStorage is similar to localStorage ; the difference is that while data in localStorage doesn't expire, data in sessionStorage is cleared when the page session ends. Whenever a document is loaded in a particular tab in the browser, a unique page session gets created and assigned to that particular tab.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *