Persisting data using LocalStorageProxy

This recipe describes the usage of HTML5 provided local storage. This persists the data across sessions.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

proxy: {
          type: 'localstorage',
          id : '5443ch05localkey'
      }

How it works...

The preceding code uses the local storage proxy to store the data on the browser. Similar to SessionStorageProxy, this also requires a unique ID against which the data is stored and used to retrieve.

See also

  • The recipe named Setting up the browser-based development environment in Chapter 1
  • The recipe named Creating models in this chapter
  • The recipe named Persisting session specific information using SessionStorageProxy ...

Get Sencha Touch Cookbook 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.