How to collect a user preference using a form and save it for an entire sesssion?

Hi all -

I have a simple need and I see various ways it might be accomplished, but I’m not sure what the easiest way will be.

The need is: when a user first arrives at the site, I want to have them answer a couple of questions, then use the answers in fields around the site during their entire session. As a simple example, when a user first comes I would display a form asking their name, then their name would be used in various text on all the pages of the site.

These aren’t logged in users, and really I just need to hold the data for the session - but it would be great if I could stick it in a cookie and hold it longer.

Anyways, is there a simple (or simplest) way to grab a few fields using forms, hold on to them during a user session, and use them in the visible text on other pages? Any help appreciated - this is going to stay simple so hoping to find the easiest approach.

thank you!

Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Research browser local storage which replaces cookies. You need some coding skills to implement.