wordpress-playground icon indicating copy to clipboard operation
wordpress-playground copied to clipboard

Persist filesystem changes after page refresh

Open adamziel opened this issue 3 years ago • 0 comments

What problem is this issue trying to solve?

At the moment, all database changes and uploads are gone once the page is refreshed. Preserving them would be useful for courses, technical demos, even sharing a link to your changes.

What solution does this issue propose?

A few ideas:

  • https://github.com/jlongster/absurd-sql can persist SQLite database in IndexedDB
  • localStorage could store the binary contents of the .sqlite file every few seconds
  • An "audit trail" of all SQL writes could be stored and re-applied on refresh
  • (in the future) The sqlite file could reside in the persistent Filesystem API

adamziel avatar Sep 26 '22 01:09 adamziel