Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double loading of files to be cached #49

Open
connetcom opened this issue Apr 19, 2019 · 0 comments
Open

Double loading of files to be cached #49

connetcom opened this issue Apr 19, 2019 · 0 comments

Comments

@connetcom
Copy link

connetcom commented Apr 19, 2019

Hi,

Not sure this is a place to ask questions and if not apologies and could you direct me to a more appropriate forum. Thanks.

One general issue (not with this code per-se but related to service worker caching in general) that i see is that some files get loaded twice - specifically those links and scripts which are in the doc head section and then again in the set of files that are to be cached during the service worker install. For example the script <script src='/scripts/pwacompat.min.js' async></script> is loaded at the end of and is also in the cache.addAll of the install.

So, what seems to happen is that the files that are loaded by the browser because they are linked in the head section get loaded before the install event occurs for the service worker and then get loaded again during the install process to put them in cache.

Am I understanding this correctly and if so, is there a particular strategy to follow to minimize or avoid this?

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

No branches or pull requests

1 participant