Before we suggest to the community that purely client-side storage of autosaves is possible, we should confirm that
- IndexeDB is allowed to be used within our compatibility policy; and
- we don't want to support cross-device recovering.
Before we suggest to the community that purely client-side storage of autosaves is possible, we should confirm that
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | Spike | • HMonroy | T332339 Investigate options for auto-save feature | ||
| Resolved | Samwilson | T340541 Investigate IndexedDB as a data store for the auto-save wish |
IndexedDB isn't used in MediaWiki core or extensions yet.
All Grade-A browsers support it with the exception of Safari 14, where there's a bug.
It seems likely that recovering edits that failed to save due to network outages is more important that recovering on different devices.
There is also the question of privacy of the local data, especially for shared devices. It looks like it'd be best to delete all autosaved data when a user logs out, but not when they log in (i.e. they might start editing a page while logged out, leave that page to log in, and then when returning to it would still have their edits).
The storage schema could have a few possibilities:
Change 935987 had a related patch set uploaded (by Samwilson; author: Samwilson):
[mediawiki/core@master] [WIP] Edit recovery feature using indexedDB
Test wiki created on Patch demo by HMonroy (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/b9f73463ef/w
Test wiki on Patch demo by HMonroy (WMF) using patch(es) linked to this task was deleted:
The discussions this week have solidified our decision that indexedDB is fine to use for this. I'll move the above patch to the actual work ticket T341844.