
Client-Side Data Storage
Beschreibung
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
Weitere Details
Weitere Ausgaben
Inhalt
- 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
Systemvoraussetzungen
Dateiformat: PDF
Kopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
- Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).
- Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions oder die App PocketBook (siehe E-Book Hilfe).
- E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)
Das Dateiformat PDF zeigt auf jeder Hardware eine Buchseite stets identisch an. Daher ist eine PDF auch für ein komplexes Layout geeignet, wie es bei Lehr- und Fachbüchern verwendet wird (Bilder, Tabellen, Spalten, Fußnoten). Bei kleinen Displays von E-Readern oder Smartphones sind PDF leider eher nervig, weil zu viel Scrollen notwendig ist.
Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.
Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.