Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Move PrecacheConfig to external file #236

Closed
FluorescentHallucinogen opened this issue Jan 27, 2017 · 2 comments
Closed

Move PrecacheConfig to external file #236

FluorescentHallucinogen opened this issue Jan 27, 2017 · 2 comments

Comments

@FluorescentHallucinogen
Copy link

FluorescentHallucinogen commented Jan 27, 2017

Generated service-worker.js files are identical except PrecacheConfig variable. What about move PrecacheConfig to external file?

@jeffposnick
Copy link
Contributor

That's intentional. Changing the generated service-worker.js file itself is necessary in order to trigger the service worker update flow, which is what is responsible for caching the updated resources.

As of right now, updates to external files that get pulled in to the main service worker via importScripts() won't trigger the service worker update flow, so it's possible to move the file hashes to an external file. This will change in the future, as the service worker specification has been modified to allow changes to files pulled in via importScripts() to trigger the update flow. However, until all browsers with service worker support are updated to this new behavior, we can't change the current approach.

@FluorescentHallucinogen
Copy link
Author

What about leave this issue open until all browsers with service worker support are updated to this new behavior?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants