Help coding to dataset

I need to know if it’s possible to save content to a dataset and then retrieve it per member. For example, there are 3 buttons on a page, member1 pushes button1. That will save the value “1” to “value1”. Member2 pushes button2. That will save the value “2” to “value1” in subsequent pages I would direct the member to a specific URL depending on the value each member has in “value1”. So, Member1 according to the value from button1 and member 2 according to the value from button 2. Is this possible, or something quite like it? As long as I can retrieve information and have the page react to what the client inputted. Kind of like a preference, or language setting say. I can reproduce the effect already using local storage, keys and values easily, BUT want to limit frustrations when member clears their cache. Thanks a lot for any and all help.