Articles on: Offline & Sync

Storage & Limits

Storage & Limits — Local storage guidance and best practices


This article explains how CJH uses local storage for offline operations, practical limits you should observe, and recommended best practices to avoid storage-related problems.


Local storage mechanisms

  • CJH uses IndexedDB (via client-side libraries) to store queued operations and attachments while offline. The project includes an IndexedDB helper dependency (idb) for robust storage operations. This allows queued items to persist across restarts. :contentReference[oaicite:12]{index=12}


  • Photos: Photos are the largest local storage consumer. Encourage technicians to:
  • Use moderate photo resolutions — not every photo needs full camera resolution.
  • Delete extraneous photos before leaving the jobsite.
  • Prefer Wi-Fi to upload large batches to avoid timeouts and reduce cellular costs. :contentReference[oaicite:13]{index=13}
  • Queued items: Keep the number of queued operations reasonable. The client should be able to handle many small queued items, but very large queues (thousands of items or gigabytes of images) can degrade performance or cause storage pressure on devices.


Platform considerations

  • iOS: IndexedDB and PWA storage on iOS can be reclaimed by the OS under low storage conditions (particularly for PWAs). For critical offline-first usage, consider using the native app where storage retention is more predictable.
  • Android: Android maintains app storage more aggressively but some vendors have aggressive storage reclaim policies; advise users to monitor available device storage.


Monitoring & housekeeping

  • Periodic cleanups: Implement or run periodic cleanup for temporary artifacts and remove local references to attachments once they are confirmed uploaded and acknowledged by the server.
  • User guidance: Provide technicians with a small “storage check” checklist (available space, queued items, oldest queued date) as part of field operations.


When storage problems occur

  • If the app reports storage errors or fails to queue, check available device storage and clear space. For PWA users, clearing site data can sometimes resolve corruption but will also remove local queue entries — do this only after exporting queued items or coordinating with support.





Updated on: 10/01/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!