Hi,
I'm trying to update my service worker on every fresh deployment on firebase server but I can't find any way on how to do it.
@jeffposnick
Hello @rawris鈥擳he most relevant thing to keep in mind when ensure your service worker updates in a timely manner when using Chrome is to disable HTTP caching of your service-worker.js file on your server. There's more information at https://stackoverflow.com/questions/38843970/service-worker-javascript-update-frequency-every-24-hours/38854905#38854905
Configuring this in Firebase is fairly straight forward; here's an example (swap out /sw.js for /service-worker.js): https://github.com/googlearchive/workbox-microsite/blob/eaee7d0899c582afe1b2a327777c1906368c1624/firebase.json#L4
Most helpful comment
Hello @rawris鈥擳he most relevant thing to keep in mind when ensure your service worker updates in a timely manner when using Chrome is to disable HTTP caching of your
service-worker.jsfile on your server. There's more information at https://stackoverflow.com/questions/38843970/service-worker-javascript-update-frequency-every-24-hours/38854905#38854905Configuring this in Firebase is fairly straight forward; here's an example (swap out
/sw.jsfor/service-worker.js): https://github.com/googlearchive/workbox-microsite/blob/eaee7d0899c582afe1b2a327777c1906368c1624/firebase.json#L4