OLD | NEW |
1 <h1>Offline First</h1> | 1 <h1>Offline First</h1> |
2 | 2 |
3 | 3 |
4 <p> | 4 <p> |
5 Because internet connections can be flakey or non-existent, | 5 Because internet connections can be flakey or non-existent, |
6 you need to consider <em>offline first</em>: | 6 you need to consider <em>offline first</em>: |
7 write your app as if it has no internet connection. | 7 write your app as if it has no internet connection. |
8 Once your app works offline, | 8 Once your app works offline, |
9 add whatever network functionality you need | 9 add whatever network functionality you need |
10 for your app to do more when it’s online. | 10 for your app to do more when it’s online. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 Easy to sync remotely (but you don't have to). | 179 Easy to sync remotely (but you don't have to). |
180 Not good for larger amounts of data, | 180 Not good for larger amounts of data, |
181 due to quotas. | 181 due to quotas. |
182 </td> | 182 </td> |
183 </tr> | 183 </tr> |
184 <tr> | 184 <tr> |
185 <td> IndexedDB API </td> | 185 <td> IndexedDB API </td> |
186 <td> Structured data </td> | 186 <td> Structured data </td> |
187 <td> Enables fast searches on data. | 187 <td> Enables fast searches on data. |
188 Use with the | 188 Use with the |
189 <a href="manifest.html#permissions">unlimitedStorage permission</a>. </td
> | 189 <a href="declare_permissions.html">unlimitedStorage permission</a>. </td> |
190 </tr> | 190 </tr> |
191 <tr> | 191 <tr> |
192 <td> Filesystem API </td> | 192 <td> Filesystem API </td> |
193 <td> Anything else </td> | 193 <td> Anything else </td> |
194 <td> Provides a sandboxed area where you can store files. | 194 <td> Provides a sandboxed area where you can store files. |
195 Use with the | 195 Use with the |
196 <a href="manifest.html#permissions">unlimitedStorage permission</a>. </td
> | 196 <a href="declare_permissions.html">unlimitedStorage permission</a>. </td> |
197 </tr> | 197 </tr> |
198 </table> | 198 </table> |
199 | 199 |
200 <p class="note"> | 200 <p class="note"> |
201 <b>Note:</b> | 201 <b>Note:</b> |
202 Packaged apps cannot use Web SQL Database or localStorage. | 202 Packaged apps cannot use Web SQL Database or localStorage. |
203 The WebSQL specification has been deprecated for awhile now, | 203 The WebSQL specification has been deprecated for awhile now, |
204 and localStorage handles data synchronously | 204 and localStorage handles data synchronously |
205 (which means it can be slow). | 205 (which means it can be slow). |
206 The Storage API handles data asynchronously. | 206 The Storage API handles data asynchronously. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 switching often between online and offline. | 294 switching often between online and offline. |
295 </li> | 295 </li> |
296 </ul> | 296 </ul> |
297 | 297 |
298 <p> | 298 <p> |
299 Also make sure that the app saves <b>no sensitive user data</b> | 299 Also make sure that the app saves <b>no sensitive user data</b> |
300 (such as passwords) on the user's machine. | 300 (such as passwords) on the user's machine. |
301 </p> | 301 </p> |
302 | 302 |
303 <p class="backtotop"><a href="#top">Back to top</a></p> | 303 <p class="backtotop"><a href="#top">Back to top</a></p> |
OLD | NEW |