There are a couple of ways to handle persistency I can think of:
localStorage (as you mentioned)
cookie (max limit 4KB or so)
output in JSON, YAML or some other format and provide means to load the file
store data on the server side
I suppose it might be interesting to fiddle with cookies to see how that plays out. At some point the size constraint is going to be an issue but I guess for now it just might do it.
Possible solutions to quote myself: