HTML Web Storage
With web storage, web applications can store data locally within the user's browser.
What is HTML Web Storage?
Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance.
HTML web storage provides two objects for storing data on the client:
window.localStorage- stores data with no expiration datewindow.sessionStorage- stores data for one session (data is lost when the browser tab is closed)
localStorage Example
Result