Replace sessionStorage with localStorage