What is the best way to do this.
The answer is DON’T.
Frankly, I cannot think of ANY reason to do this. If I found that my browser buttons did not work on your site I would run away as fast as I could, never come back and tell my friends to avoid it.
I assume you mean ‘save their input details` or something like that.
I think you are trying to solve a specific problem in completely the wrong way.