sw-tips icon indicating copy to clipboard operation
sw-tips copied to clipboard

Renaming the SW script file is sometimes okay

Open ithinkihaveacat opened this issue 7 years ago • 1 comments

Never rename the ServiceWorker script file

Sometimes this can be helpful, in particular in cases where you can't change the service worker itself, but it imports scripts (perhaps from another origin) that do change. In this case, changing the name of the service worker creates a "new" service worker that leads to the browser re-checking and re-downloading all dependencies. (More info.)

ithinkihaveacat avatar May 08 '17 08:05 ithinkihaveacat

Thanks, that's a good point. Will add a note...

popeindustries avatar May 08 '17 09:05 popeindustries