PricingBlog

Offline Mode

  • pixieinwonderland-1271143252669501442

    pixieinwonderland

    1 year ago

    Can Toddle work offline? For example, if I make an API call to a database to retrieve the data, can Toddle store the data within the app, so that if the user loses internet connection, they can keep working with the data?
  • lucasg-1271150756162048141

    Lucas G

    1 year ago

    That would be something for you to implement
  • tomthebigtree-1271153808763781120

    Tom Ireland

    1 year ago

    Following on from what Lucas was saying, I think it depends. If you have a single page app and the page is loaded before you lose connection, you should still be able to interact with it (based on own testing) because the page has already been served - might need a technical opinion on that.

    For data storage, you could utilise local or session storage in the browser to store data and then send it back and clear once connected again. There are caveats though:

    1. You'd need to figure a way to detect a lost connection.
    2. It'd likely only work with a single page app.
    3. Local storage is saved in the browser until the browser data is deleted.
    4. Session storage is saved in the browser until the session (tab/window) is closed.

    For 3 & 4, ideally your user would not be using a shared machine as this would expose the data and I'd only store non-sensitive data.

    The Team toddle team might be able to shed more light on what may be possible in the future or add to/correct anything I've mentioned. Hope that helps! 🙂
  • andreasmoller-1271161430376452222

    Andreas Møller

    1 year ago

    Offline apps are a fairly complex issue. As Lucas mentioned it is possible, but requires custom code.
  • andreasmoller-1271161948758868079

    Andreas Møller

    1 year ago

    Each case is generally different.

    Sometimes you just need caching like with Google maps.

    That is something we will add much better support for soon.

    Other times you need something like https://en.m.wikipedia.org/wiki/Conflict-free_replicated_data_type

    If you are building google docs