Offline mode
Learn how to configure Retool Mobile apps for offline use.
Offline mode makes it possible for Retool Mobile apps that run natively to continue functioning without a data connection. When enabled, queries that read data can cache the most recent results to make them available offline. Queries that write data are held in a queue and run once the data connection is restored.
Considerations
If you plan to use offline mode, keep in mind the following considerations.
Read queries only cache data when viewed by the user
Queries configured to read data for offline mode only cache data when the user views the results. The user must navigate to screens and view the query data at least once while connected.
If you need to download data in advance, consider using localStorage to temporarily download data that can be accessed when offline.
Write queries run sequentially
Queries configured to write data in offline mode run sequentially when the connection is restored. If one query fails due to a conflict, the user must resolve it before any remaining queries can run.
Write queries cannot have dependencies
Queries with pending changes in offline mode cannot depend on any other queries. For example, if you have a customer management app that is offline, the user could not create a new customer record and then refresh the list of customers. Similarly, the user could not create a new customer record offline and then make further changes.
Handle conflicts
All pending tasks run sequentially when a device's connection is restored. If multiple users made changes to the same data, offline mode cannot merge their changes. Consider using sync delay when enabling offline mode so that users must trigger pending tasks.
Cached data limits
Retool Mobile can cache up to 100MB of data. If offline mode exceeds this limit, Retool Mobile excludes the last used entries.
Enable offline mode
Offline mode is available on a per-app basis and enabled in the app IDE. Click