Save linked images in an app inside the cache using service worker or in database using nedb

75 Views Asked by At

I want to save the images that are provided by a JSON response from an api service. At the moment the user have the ability to deiplay them and to save them on the pc. What I want to do is to store the image inside an internal database of my app that will act as caching so if the user will make the same search after a short time, the app will be able to provide all the informations from the database and will load quickly. Is this possible using javascript? As database I'm using nedb, I think that it can accomplish the task, but I'm reading about service workers and the cache API, is possible to do this with a service worker?

0

There are 0 best solutions below