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

Retrieving and updating data - JavaScript Tutorial

From the course: Improving Performance with IndexedDB and Caching

Start my 1-month free trial

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.

Contents