なぜ考えるか
ローカルデータで先に表示し(Android Developers, n.d.; Kleppmann et al., 2019)、Webではキャッシュを(MDN, n.d.-a; web.dev, n.d.)。
接続状態の通知
落ち着いたバナーを出し(MDN, n.d.-b; Miller, 1968)、進捗表示や空の状態を使い、読み上げにも通知(WCAG 2.2 4.1.3)。
未送信と同期
待機列に入れて後で送り、競合は統合か選択で(Kleppmann et al., 2019)。取り消しも。
よくある質問
- 全機能をオフラインに?
- よく使う機能から。
- 正確な検知は?
- 実際の失敗も併せて判断。
出典確認日:2026-10-27
参考文献
- MDN Web Docs. (n.d.-a). Service Worker API. Service Workerでのキャッシュです。
- MDN Web Docs. (n.d.-b). Navigator: onLine property. オンライン状態の検知です。
- web.dev. (n.d.). The offline cookbook. キャッシュ戦略です。
- Android Developers. (n.d.). Build an offline-first app. オフラインファースト設計です。
- Kleppmann, M., Wiggins, A., van Hardenberg, P., & McGranaghan, M. (2019). Local-first software: You own your data, in spite of the cloud. In Proceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (pp. 154–178). ACM. ローカルファーストの考え方です。
- Miller, R. B. (1968). Response time in man-computer conversational transactions. In Proceedings of the December 9–11, 1968, Fall Joint Computer Conference, Part I (pp. 267–277). ACM. 応答時間の基準です。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 4.1.3ステータスメッセージです。
