Chapter 6. Store data in the Browser

Backbone was mainly designed to work with RESTful API servers; however, you don't want to always store the data in a server for offline applications or to bust application loading storing cache data in the browser.

We have two choices to store data in the user browser: use localStorage or the new IndexedDB API. While localStorage has wide support on major browsers, IndexedDB is the new specification that is yet to be supported in the near future. Another option that is available currently; however, in deprecated status is Web SQL. If you are developing modern web applications, you should avoid using Web SQL.

In this chapter, you will learn the following topics:

  • Basics of localStorage
  • Basics of IndexedDB
  • Using localStorage ...

Get Mastering Backbone.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.