How can I keep the name of the User in the Home Page even when he navigates through other pages and then comes back to the Home Page again?
It's a simple Button through which, once clicked, a prompt asks for the Users name and displays a greeting.
For example:
Button: Who are you?
Prompt: Insert your name
Message Displayed: Hi [Name], welcome to the WebSite!
The problem is that when the User refresh the Home Page, the name disappear and he should click again the button.
Is there any way to keep the User Name in the whole session?
Thanks!
localStorage
Mozilla ref,localStorage
w3schools refwrite my code platform
....you are saving the data into the browsers memory which will be released on reloading the page....thus you have to use the localStorage or evencookies