Relative Content

Tag Archive for service-workerbrowser-cache

Reload only changed files in serviceworker cache

I am using a ServiceWorker to precache files. The serviceworker.js is generated whenever I build the application, and all files newer than the last version of serviceworker.js are added to the file as an array, as well as the current timestamp, so if I modify a cached file it is added to the cache and the timestamp changes, so the serviceworker is reinstalled. In the install event handler, I delete the new files then add them: