1.

Explain localStorage and sessionStorage.

Answer»

Local storage uses windows.localStorage OBJECTS to store data with no expiration date. The data STORED in the local storage will be present even when the user closes and reopens the browser.

Session storage uses the windows.sessionStorage object to store data for a SINGLE session. The data is deleted from the browser storage when the user closes the browser because the session is lost.



Discussion

No Comment Found