Using IndexedDB

Besides local and session storage, IndexedDB also provides us with a way to store user data in the browser. IndexedDB is more advanced than local storage: it allows us to store data in object stores and supports indexing the data.

In this recipe, we're going to create a simple todo list app which stores its data in IndexedDB. We're going to use the Angular framework covered in Chapter 10, Data Binding Frameworks to simplify our code. We're going to find out if IndexedDB is a better choice for larger, more complicated data models with more complex search and retrieval needs.

The todo list application will support current and archived items and will allow filtering the items by date.

How to do it...

Let's write the code:

  1. Create index.html ...

Get HTML5 Data and Services Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.