+ 4

Hi, where on sololearn can I go to find the answer on local storage or session storage

The script below is getting a security violation when I run it from the sololearn browser but runs fine from chrome on my pc. <script> if(sessionStorage) { sessionStorage.setItem("last_name", "Parker"); // Retrieve data alert("Hi, " + localStorage.getItem("first_name") + " " + sessionStorage.getItem("last_name")); } else { alert("Sorry, your browser do not support session storage."); } </script>

10th Mar 2020, 2:35 AM
Musto Khan
Musto Khan - avatar
2 Réponses
+ 10
What answer do you want to get? Sololearn avoids local storage and session storage for security reasons.
11th Mar 2020, 8:44 PM
Igor Makarsky
Igor Makarsky - avatar
+ 2
Thank you for responding Igor. Much appreciated.
11th Mar 2020, 10:04 PM
Musto Khan
Musto Khan - avatar