Reputation: 11
For some reasons I set sessionStorage to retrieve page State of scroll... But now each time I logout the sessionStorage doesn't clear even after I tried sessionStorage.clear() or sessionStorage.removeItem(key)
please how can I unset this once the user logs out?
Upvotes: 1
Views: 1085
Reputation: 1673
User Session Stored at Server side but sessionStorage is at client side script. add at "you have successfully logged out" page
echo '<script> sessionStorage.removeItem("key")</script>';
Upvotes: 1