
Client-Side Data Storage
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
One of the most useful features of today's modern browsers is the ability to store data right on the user's computer or mobile device. Even as more people move toward the cloud, client-side storage can still save web developers a lot of time and money, if you do it right. This hands-on guide demonstrates several storage APIs in action. You'll learn how and when to use them, their plusses and minuses, and steps for implementing one or more of them in your application.
Ideal for experienced web developers familiar with JavaScript, this book also introduces several open source libraries that make storage APIs easier to work with.
- Learn how different browsers support each client-side storage API
- Work with web (aka local) storage for simple things like lists or preferences
- Use IndexedDB to store nearly anything you want on the user's browser
- Learn how support web apps that still use the discontinued Web SQL Database API
- Explore Lockr, Dexie, and localForage, three libraries that simplify the use of storage APIs
- Build a simple working application that makes use of several storage techniques
More details
Other editions
Additional editions

Content
- Intro
- Copyright
- Table of Contents
- Preface
- Conventions Used in This Book
- Using Code Examples
- Safari® Books Online
- How to Contact Us
- Acknowledgments
- Chapter 1. A Gentle Introduction to Client-Side Data Storage
- Chapter 2. Working with Cookies
- Cookies? Seriously?
- Working with Cookies
- Reading Cookies
- Deleting Cookies
- Demos
- Inspecting Cookies Within Developer Tools
- Support and Recommended Usage
- Chapter 3. Working with Web Storage
- Web Storage, AKA Local Storage
- Working with Web Storage
- Demos
- Listening for Storage Changes
- Inspecting Web Storage with Dev Tools
- Support and Recommended Usage
- Chapter 4. Working with IndexedDB
- Welcome to Deep Data
- Key IndexedDB Terms
- Checking for IndexedDB Support
- Working with Databases
- Working with Object Stores
- Making Object Stores
- Defining Primary Keys
- Defining Indexes
- Working with Data
- Creating Data
- Reading Data
- Updating Data
- Deleting Data
- Getting All the Data
- Working with Ranges and Indexes
- Even More with IndexedDB
- Storing Arrays
- Counting Data
- Inspecting IndexedDB with Dev Tools
- Support and Recommended Usage
- Chapter 5. Working with Web SQL
- Dead Spec Walking
- Basic Database Terms
- Checking for Web SQL Support
- Working with Databases
- Working with Transactions
- Inspecting Web SQL with Dev Tools
- Support and Recommended Usage
- Chapter 6. Making It Easier with Libraries
- "Use the Library, Luke..."
- Working with Lockr
- Simplifying IndexedDB with Dexie
- Working with localForage
- More Options
- Chapter 7. Building a Sample Application
- Let's Build Something!
- Our Sample Data
- The Application
- The Code
- Wrap-up
- Index
- About the Author
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.