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?
Asked
Active
Viewed 66 times
1

nukiko12
- 129
- 1
- 1
- 10
-
what have you tried so far? please add some code – Hello World Aug 20 '20 at 17:58
-
@HelloWorld at the moment I don't have any code because I need to figure out if what I want to achieve is possible, and how I can do it in javascript, this is why I'm asking for help and opinions about. I'm not experienced with javascript, still learning. – nukiko12 Aug 20 '20 at 18:56
-
what you are trying to do is a bit complicated task. and if you are asking "is that possible" know that anything can be achieved by rightly programming a program. – Hello World Aug 21 '20 at 11:21
-
the solution to your problem can be accomplished with the combination of frontend and backend and `nedb`. But first, you should try doing anything – Hello World Aug 21 '20 at 11:24
-
@HelloWorld I don't have a backend, I'm working on a browser extension, I can only use nedb to store data and javascript. I will do more research about. – nukiko12 Aug 21 '20 at 13:04