StartPolymer / polymer-starter-kit-plus

A starting point for building Single-Page Applications with Polymer 2.x
MIT License
5 stars 2 forks source link

Service worker doesn't update cache when file changes on server #15

Open Boscop opened 6 years ago

Boscop commented 6 years ago

In this project, when i change the source, it won't get updated in the user's browser because the service worker is caching all files. How can i make it reload the new file from the server when it changed on the server, but cache until the next change? E.g. I'm having this issue with base-bundle.html which contains the whole app code. I do gulp deploy:dev and it pushes the compiled frontend bundle to the server via ssh. But when i push a new build, the browser doesn't refresh the assets, only when i do a hard refresh with CTRL+F5 which i can't expect customers to do.