Ironically, unless the author has committed to maintain it forever, that library will inevitably become a "legacy library that is no longer actively maintained" that's part of the problem they're trying to solve. Presumably a short blog post about how to serialize some form data to a JSON object and save it to localStorage when a field's onBlur event fires, and how to load that data and populate the form when the page loads, wouldn't have been complicated enough.
Autosave is usually associated with something like Microsoft Word.
As far as I can tell, this is about a JavaScript library for restoring HTML form values if something goes wrong. OK, sure that's a form of autosave.
But then the HN title is "autosave is not recovery" which... huh? Isn't the article saying it is for recovery?
Also, the article is a bunch of confusing philosophizing and doesn't really explain anything at all. The linked GitHub repo at the end is infinitely more informative:
The "serialize to localStorage on blur" approach onion2k mentions seems like it would catch most cases. But I've definitely lost form data in ways I couldn't explain. Mobile Safari is particularly bad about this.
The web dev who built it needs to have made a few errors at the same time, but browsers, HTTP servers, and JS all work in tandem to make foot-guns like that very easy to pull off.
Pepp38•2d ago
I wrote this short essay after thinking about how normal user behavior, mobile browsers, and silent failures make data loss mostly invisible in modern web apps.