#webtech2
All Messages

localStorage.setItem("name", "Tom"); sessionStorage.setItem("name", "Jerry");
Alternately, removeItem() method may also be used:
localStorage.removeItem ("name");
sessionStorage.removeItem ("name");
Entire storage is made empty using clear() method:
localStorage.clear(); sessionStorage.clear();

web storage: local and session storage:
There are two types of storage available: local storage and session storage. Data stored in local storage are never expired and removed unless they are deleted explicitly. The data will be available even the browser/tab is closed or reopened. However, data stored in session storage by a page in a window/tab are only available as long as the window/tab remains opened. So, as soon as a browser window/tab is closed, the session storage associated with it is removed. The local and session storages are provided via two Storage objects: window.localStorage and window.sessionStorage.

Application cache:

