-
Notifications
You must be signed in to change notification settings - Fork 1
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
Question: is this compatible with PSK out of the box? #6
Comments
I've found out that its not an issue with the service worker registering or the PSK implementation or your Element:
In a production environment, however, one should rethink the importance of the app's up-to-dateness for the sake of LIGHTSPEED page load times and adjust it back to one hour ;-) Maybe its worth a little line in the documentation, but it's your choice! |
Oh yeah good find, thats a point i struggled with too and would be a good addition to the readme (since we already have a section on registering an sw). I'll leave this open to track the issue until its added to the docs. |
Why do you use service worker during development? The polymer starter kit service-worker.js says: |
Yes but at development time you also have to test your build (with the service worker which is generated at build time, not the dummy one in the source folder which only logs this line) And when its critical for your app to be up to date, you also need a fresh service worker with fresh document hashes to purge the old documents in cache ;) |
I know its not the propper place to ask questions, but is this element compatible and working out of the box with the Polymer starter Kit Service-Worker implementation?
At mine it does not trigger the updatefound event, even if I change something at sw-precache-config.js or directly at the generated service-worker.js...
e.g. chaning the cacheId from 001 to 002 and then build + deploy the changes. Nothing happens on page reload.. but when I go to dev tools application tab, and click update on the service worker, the toast shows up, and then on page reload the new content shows up..
I guess the boilerplate for registering the service worker (inside index.html of the PSK) is not enough?
Maybe changing documentation if some more lines of code is needed to fire the updatefound event?
Kind Regards,
Chwzr
The text was updated successfully, but these errors were encountered: