How do I auto populate a form with browser local storage?

Hi, is there a way to auto-populate a form with values from the browser local or session storage?
In other words, when the form loads, it is filled with the values from the browser local storage. Right now, we can only use record rules to populate the record with browser local storage upon submission of the form. There is no chance to see what was populated.