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

Re-add service worker #362

Open
molant opened this issue Jan 19, 2018 · 3 comments
Open

Re-add service worker #362

molant opened this issue Jan 19, 2018 · 3 comments

Comments

@molant
Copy link
Member

molant commented Jan 19, 2018

Because the service worker is in the root right now we are not cache busting it nor adding the right cache-control header. We should find a way to do this.

@qzhou1607-zz
Copy link
Contributor

@molant The cache-control header is set to no-cache in the sonarwhal-worker. What's the "right" cache-control header value that it should be changed to? It doesn't seem right to me to set a max-age for the service worker since the content is mutable.

@molant
Copy link
Member Author

molant commented Feb 5, 2018

I think that if you move the scripts to /static/scripts the gulp task should take care of updating the file names and the html that points to it.

@Malvoz
Copy link
Member

Malvoz commented Sep 13, 2018

Here's a couple of pointers, I hope they'll be of help if/when you decide to reintroduce service workers again:

For webhint-worker.js:

For sw-reg.js:

  • Can be placed anywhere, just point the registration to /webhint-worker.js.

@molant molant changed the title Cache busting of service worker + cache-control Re-add service worker Sep 14, 2018
@molant molant added the Epic label Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants