Save code into localStorage instead of sessionStorage