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

sw-toolbox.js cannot be imported when offline #29

Closed
knownasilya opened this issue Jun 22, 2016 · 3 comments
Closed

sw-toolbox.js cannot be imported when offline #29

knownasilya opened this issue Jun 22, 2016 · 3 comments

Comments

@knownasilya
Copy link

knownasilya commented Jun 22, 2016

Seems like the file might need to be prefetched by default? Not really sure.

An unknown error occurred when fetching the script.
service-worker.js:1

It errs on importScripts('sw-toolbox.js');. I tried adding '/sw-toolbox.js' to the prefetch but that doesn't fix it.

@jkleinsc
Copy link
Owner

@knownasilya I believe that any script brought in using importScripts should automatically be cached alongside the service worker. This article here indicates that is the case:
http://www.html5rocks.com/en/tutorials/service-worker/introduction/

I'm not sure why you are encountering this error. Do you not see the error when you are online?

@jkleinsc
Copy link
Owner

jkleinsc commented Oct 5, 2016

Closing due to no response.

@jkleinsc jkleinsc closed this as completed Oct 5, 2016
@knownasilya
Copy link
Author

knownasilya commented Oct 5, 2016

Ops, yes I do see the error when online. 😄

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

2 participants