Below are two files. One to do a localStorage and two to retrieve the variable first_name. I get a null result when I try to retrieve the variable first_name value of "Peter". I have tried windows.localStorage to no avail. The URL called by the first file opens but no retrieval.
File 1
<script>
    localStorage.setItem("first_name", "Peter");
    window.open(URL);
</script>
File 2 - URL
<script>
    first_name="";
    localStorage.getItem("first_name");
    console.log("fn",first_name); 
</script>
 
     
     
    