From the course: Improving Performance with IndexedDB and Caching
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Retrieving and updating data - JavaScript Tutorial
From the course: Improving Performance with IndexedDB and Caching
Retrieving and updating data
- [Instructor] Retrieving data from IndexedDB using localForage is just as easy as storing it. getItem takes a single argument of the key and returns a promise containing the corresponding value. LocalForage doesn't provide a specific method for updating data in your store, because setItem requires you specify the key every time. Updating data is the same as creating it. You can also remove specific values from your store using removeItem or clear an entire object store using the clear method. There are other methods in the localForage library, some of which we will look at later.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
What is IndexedDB?1m 9s
-
Data storage strategies50s
-
Introduction to IndexedDB1m 24s
-
IndexedDB libraries2m 45s
-
Creating a database in IndexedDB1m 1s
-
Storing data in IndexedDB1m 31s
-
Retrieving and updating data36s
-
Storing data from UI JavaScript9m 32s
-
Storing data from a service worker7m 56s
-
Retrieving stored data6m 13s
-
Challenge: Keep your data up to date1m 1s
-
Solution: Keep your data up to date6m 53s
-
Profiling1m 56s
-
Replacing your back end2m 8s
-
-