Web Storage

This includes local storage and session storage.


window.sessionStorage

Only available for the duration of the browser window session.
Every browser tab is independent.
It will persist during page reloads
Maximum of 5 MB

window.sessionStorage.setItem("key", "value"); 
var data = window.sessionStorage.getItem("key");

window.localStorage

Data is persisted until explicitly deleted.
Maximum of 10 MB

window.localStorage.setItem("key", "value"); 
var data = window.localStorage.getItem("key");

Cookies

maximum of 4KB




© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext