Best Javascript guide

persistence.js is an asynchronous Javascript object-database mapper. It has database-independent abstractions and can therefore easily be ported to new databases. Originally the library was designed to be used in the browser, utilizing its HTML5 WebSQL database, since then it has grown into a library that can be used in essentially every Javascript environment, including server-side Javascript environments such as node.js and RingoJS.

  • Download
  • Using with GWT
  • Who uses it?


  • What is asynchronous programming?
  • Setup persistence.js:
    • Browser-use
    • Node.js (MySQL, SQLite)
    • RingoJS (AppEngine data store)
  • Defining your data model
  • Manipulating and persisting objects
  • Querying data

Database store specific notes:

  • Browser
  • In-memory/localStorage
  • Titanium
  • MySQL on Node.js
  • SQLite on Node.js
  • AppEngine on RingoJS


There are a few persistence.js plug-ins available that add functionality:

  •, adds simple full-text search capabilities.
  • persistence.migrations.js, supports data migrations (changes to the database schema).
  • persistence.sync.js, supports database synchronization with a remote server.
  • persistence.jquery.js, adds jQuery integration, including jQuery-mobile ajax request interception.
  •, adds jQuery mobile support, including jQuery-mobile ajax request interception and re-routing to persistence.js.


If you find a bug, please report it. Or fork the project, fix the problem and send me a pull request. For a list of planned features and open issues, have a look at the issue tracker.

For support and discussion, please join the persistence.js Google Group.

Thanks goes to all authors for their contributions.


This work is licensed under the MIT license.

Support this work

You can support this project by flattering it: