silviolleite / laravel-pwa

Looks like an app, feels like an app, but IS NOT an app.
MIT License
967 stars 153 forks source link

[Question] How do I force a redownload of resources #25

Open guillermo7227 opened 4 years ago

guillermo7227 commented 4 years ago

I changed some images but the PWA keeps showing the old ones. How do I force the client to redownload all resources?

silviolleite commented 4 years ago

You need to implement this in serviceworker.js. Perhaps these links can help you:

https://medium.com/progressive-web-apps/pwa-create-a-new-update-available-notification-using-service-workers-18be9168d717

https://deanhume.com/displaying-a-new-version-available-progressive-web-app/

https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle

gtamborero commented 3 years ago

hi @guillermo7227 , have a look at this thread, It may help you to understand better the caching behaviour of your application: https://stackoverflow.com/questions/41000874/service-worker-expiration/54707038#54707038