The HTML5 SessionStorage object can be used to save data on a website code example
Example 1: javascript sessionStorage
var setsession = window.sessionStorage.setItem("animals", "cat");
var getsession = window.sessionStorage.getItem("animals");
console.log(getsession);
Example 2: localstorage
localStorage.removeItem('myCat');