←back to thread

578 points smusamashah | 2 comments | | HN request time: 0.599s | source
Show context
egeozcan ◴[] No.42463511[source]
This is very cool. BTW, when developing single HTML file apps, instead of localStorage, one can use the HTML as the source of truth, so the user can just save/save-as to persist. I had mentioned my quick and dirty attempt at an image gallery that is a self-contained html file and some really liked the concept, if not the "app" itself: https://news.ycombinator.com/item?id=41877482
replies(6): >>42463631 #>>42464347 #>>42467577 #>>42471918 #>>42476577 #>>42477123 #
xandrius ◴[] No.42463631[source]
Wait, so every time I make a change I need to remember to save or it's all lost? Or am I missing something?
replies(7): >>42463754 #>>42463869 #>>42464221 #>>42464493 #>>42464749 #>>42465571 #>>42469902 #
1. egeozcan ◴[] No.42463754[source]
Yes, is that a no-go? Maybe I’m just being too old-school :)

It does make forks a lot easier, though!

Another advantage is that it makes it clear what you’re saving, reducing the likelihood of errors being persisted.

replies(1): >>42463882 #
2. ffsm8 ◴[] No.42463882[source]
There is a pretty newish filesystem API around. You could probably make auto saving possible via that - at least after a prompt for the filesystem permission.

Or keeping it as it. That's fine too. It just came to mind