Hello, I'm posting this here as I didn't got any answer on stackoverflow and think that it may belong here.
Setup
@nuxtjs/pwa: ^3.3.3
nuxt: ^2.14.12
Context
In my app every user can upload an image and view the uploaded images. (Sort of google photos). I wanted to implement an offline mode for my app.
For now, only the images displayed are getting cached : <img class="image" :src="picto.path"/>.
I wanted that with only one button press cache all of the images. I tried to do make a GET request (with axios) for every image of the user : await axios.get("/image/"+image.path);.
Problem
Only a axios.get doesn't work.
I don't know why but only the images I get AND THEN display are getting cached.
Hello, I'm posting this here as I didn't got any answer on stackoverflow and think that it may belong here.
Setup
@nuxtjs/pwa: ^3.3.3 nuxt: ^2.14.12
Context
In my app every user can upload an image and view the uploaded images. (Sort of google photos). I wanted to implement an offline mode for my app. For now, only the images displayed are getting cached :
<img class="image" :src="picto.path"/>
.I wanted that with only one button press cache all of the images. I tried to do make a GET request (with axios) for every image of the user :
await axios.get("/image/"+image.path);
.Problem
Only a
axios.get
doesn't work. I don't know why but only the images I get AND THEN display are getting cached.Answer
All I had since the beginning was the browser cache ! I found this very nice tutorial https://web.dev/offline-cookbook/ .