gpxstudio / gpxstudio.github.io

The online GPX file editor
https://gpx.studio
MIT License
594 stars 106 forks source link

LocalStorage issues #236

Open radulle opened 1 year ago

radulle commented 1 year ago

Currently tracks are stored in LocalStorage, read on load and deleted after only to be stored again when browser closes. This can cause following issues:

  1. If you open second tab will not have tracks open, there might be a chance for tracks to be lost.
  2. Because tracks are stored in LocalStorage there is possibility for them to be lost on browser crash.
  3. LocalStorage has limit of 5MB (might be issue if someone has large number of tracks)

How do you feel about implementing IndexedDB and not deleting tracks on load. If that's ok I'd be willing to contribute.

vcoppe commented 6 days ago

Thank you very much for your suggestion, I actually did not know much about IndexedDB before your issue. I have re-implemented the website from scratch and it now uses IndexedDB instead of localStorage. You can check it out here: https://gpx.studio/gpx.studio/ and provide feedback on this new repository: https://github.com/gpxstudio/gpx.studio.