Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The options for browser storage


Using client-side data storage reduces bandwidth traffic, decreases network response times (latency), increases UI performance, and, best of all, allows your application to run offline. The local storage mechanism that we've used until now is a very simple key/value store and does have good cross-browser coverage. However, it can only store strings and is a blocking (synchronous) API; this means that it can temporarily stop your web page from responding while it is doing its job. This can be bad for performance when your app wants to store or read large amounts of data, such as images. Moreover, it has a space limit of 5 Mb (this varies with browsers); you can't detect when you are nearing this limit and you can't ask for more space! These properties make it only as useful as a temporary data storage tool—better than cookies, but not suited for reliable, database kind of storage.

On the other hand, IndexedDB is the future of offline, local object storage for...