If you write and read to "user://" in Godot, it'll automatically work with browser storage on browser exports without doing anything special. Tho when I'm just doing web dev and I need to save something small, I just use localStorage which you can look into.