javascript sessionStorage
// Save data to sessionStorage
sessionStorage.setItem('key', 'value');
// Get saved data from sessionStorage
let data = sessionStorage.getItem('key');
// Remove saved data from sessionStorage
sessionStorage.removeItem('key');
// Remove all saved data from sessionStorage
sessionStorage.clear();
var setsession = window.sessionStorage.setItem("animals", "cat");
var getsession = window.sessionStorage.getItem("animals");
console.log(getsession);
Also in JavaScript:
- random numbers javascript
- javascript array reorder elements
- how to insert a value into an array javascript
- calling javascript file in html
- javascript wait 5 sec
- how to use the replace method in javascript
- add class to html tag javascript
- ajax.complete(handler) example jquery
- cdn react
- how to change css variable in javascript
- Enclose in Brackets
- javascript get a random number with 6 digits
- how to get tomorrow date in javascript
- minify css package.json
- setinterval nodejs
- require("history").createBrowserHistory` instead of `require("history/createBrowserHistory")`
- JsonConvert.DeserializeObject convert into dynamic datatable
- leap year in javascript
- format currency javascript
- how to javascript
- javascript filter array of objects by key
- install node js on raspberry pi
- angular on back skip routes
- javascript insertBefore