How to use IndexedDB to build Progressive Web Apps

By Medium - 2020-09-01

Description

In this previous post, I talked about implementation of IndexedDB inside Service Workers. If you don’t understand that part, please read that article to clear up some concepts about service workers…

Summary

  • JavaScript How to use IndexedDB to build Progressive Web Apps In this previous post, I talked about implementation of IndexedDB inside Service Workers.
  • To insert or do any operations on database, we need to get the transaction object from the database.
  • Use keyPath as URL endpoint that you would like to use for offline access.
  • Inside service worker’s fetch event handler, if a request starts with /offline-api, then fetch data from database with key equal to the path of the request.

 

Topics

  1. Database (0.21)
  2. Mobile (0.2)
  3. Coding (0.13)

Similar Articles

Python and MySQL Database: A Practical Introduction

By realpython - 2021-01-22

In this tutorial, you'll learn how to connect your Python application with a MySQL database. You'll design a movie rating system and perform some common queries on it. You'll also see best practices a ...

Dump and load a database in Neo4j Desktop

By Graph people - 2020-11-11

Have you ever wanted to share a database you created in Neo4j Desktop with your colleague but not sure exactly how to go about it? Maybe you want to clone the database locally to perform various write ...

Spring Data Neo4j - Developer Guides

By Neo4j Graph Database Platform - 2021-01-05

For Java developers who use the Spring Framework or Spring Boot and want to take advantage of reactive development principles, this guide introduces Spring integration through the Spring Data Neo4j pr ...