You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Taking the app offline and refreshing the page works as expected the first time: the app still runs because the service worker is serving a cached version. But refreshing the page again after it has failed to find ngsw.json results in a blank screen.
Expected behavior
Angular's service worker should continue serving a cached version of the application in the face of multiple page refreshes in an offline scenario.
Perhaps the self-destruct feature could be preserved by only self-destructing when ngsw.json returns 4xx status code andindex.html returns 2xx status code.
Minimal reproduction of the problem with instructions
Serve your application and confirm that the service worker is working.
Take your application offline (or kill your web server).
Refresh the page once.
Wait for the service worker to fail to get ngsw.json.
Refresh the page again.
Observe the blank page.
What is the motivation / use case for changing the behavior?
Building Angular applications for offline use using Angular's Service Workers.
Environment
Angular version: 5.2.9
Browser:
- [x] Chrome (desktop) version 64.0.3282.186
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [x] Edge version 41.16299.248.0
For Tooling issues:
- Node version: v8.10.0
- Platform: Windows
Others:
The text was updated successfully, but these errors were encountered:
I'm submitting a...
Current behavior
Since Angular's service worker self-destructs "when the service worker's request for
ngsw.json
returns a404
", it always eventually self-destructs in all offline scenarios.Taking the app offline and refreshing the page works as expected the first time: the app still runs because the service worker is serving a cached version. But refreshing the page again after it has failed to find
ngsw.json
results in a blank screen.Expected behavior
Angular's service worker should continue serving a cached version of the application in the face of multiple page refreshes in an offline scenario.
Perhaps the self-destruct feature could be preserved by only self-destructing when
ngsw.json
returns4xx
status code andindex.html
returns2xx
status code.Minimal reproduction of the problem with instructions
STEPS TO REPRODUCE:
ngsw.json
.What is the motivation / use case for changing the behavior?
Building Angular applications for offline use using Angular's Service Workers.
Environment
The text was updated successfully, but these errors were encountered: