How To Code An Apocalypse-Proof Autosave Feature
Autosave: it’s 2020, you don’t expect your users to manually save their content every ten seconds. You have to regularly store the state of the text editor to avoid data loss. An autosave call has to be debounced to reduce the load on the server. You also have to take into account network errors: an autosave feature should be implemented with offline in mind, using web APIs such as Background Sync and Web Storage.