You could also create a cookie with an indefinite expiry, and use that as a pseudo-database to generate a block of text in CSV format that could then be used to generate a text file. You could then either reload the cookie every time if you can guarantee persistence, or parse the saved CSV when you open the web page locally. This should help get you started:
Code taken from:
Javascript: Create and save file - Stack Overflow[
^]; credit to: Awesomeness01
function download(text, name, type) {
var a = document.getElementById("a");
var file = new Blob([text], {type: type});
a.href = URL.createObjectURL(file);
a.download = name;
}
<a href="" id="a">click here to download your file</a>
<button onclick="download('file text', 'myfilename.txt', 'text/plain')">Create file</button>