The new html5 specs have a window.sessionStorage
and window.localStorage
. Is the window.sessionStorage
persisted to disk or is it just in the browser app's memory for the time it is open?
Thanks
The new html5 specs have a window.sessionStorage
and window.localStorage
. Is the window.sessionStorage
persisted to disk or is it just in the browser app's memory for the time it is open?
Thanks
Please refer to these links where local storage/session storage is explained in detail.
HTML5 Local storage vs. Session storage
https://blog.devgenius.io/all-about-localstorage-in-js-4760dbff0b0d
https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API
In browsers that are Chromium(Chrome) based, the data is saved in a SQLite file in the subfolder having the location of /AppData/Local/Google/Chrome/UserData/Default/Local Storage.
localStorage and sessionStorage both extend Storage. There is no difference between them except for the intended "non-persistence" of sessionStorage.
That is, the data stored in localStorage persists until explicitly deleted. Changes made are saved and available for all current and future visits to the site.
For sessionStorage, changes are only available per window (or tab in browsers like Chrome and Firefox). Changes made are saved and available for the current page, as well as future visits to the site on the same window. Once the window is closed, the storage is deleted.
refer this SO Link