Tip 28 | Storing Data in a Client-Side Database Using IndexedDB |
The localStorage and sessionStorage methods give us an easy way to store simple name/value pairs on the client’s computer, but sometimes we need more than that. The HTML5 specification initially introduced the ability to store data in relational databases. The storage part has since been spun off into a separate specification called Web SQL Database.[69]
If you have even a basic background in writing SQL statements, you’ll feel right at home in no time. Unfortunately, that specification is all but abandoned in favor of IndexedDB, an object database that is incredibly powerful, though a little more complex to use. Let’s explore IndexedDB as we build a simple client-side web application. ...
Get HTML5 and CSS3, 2nd Edition 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.