Angular 10.2.4 Progressive Web App 通过 HTTPS 在 Apache Tomcat 9.0.41 上提供服务,并且可以离线工作。更新到 Google Chrome 版本 89.0.4389.72(64 位)后,我们在首次加载时在 DevTools 中收到警告:
无法安装站点:页面无法脱机工作。从 Chrome 93 开始,可安装性标准发生变化,此站点将无法安装。有关 更多信息,请参阅https://goo.gle/improved-pwa-offline-detection。
同样在网络选项卡中,我看到两个失败的提取:
| 姓名 | 小路 | 网址 | 地位 | 类型 | 发起人 |
|---|---|---|---|---|---|
| 例子.com | / | https://example.com | (失败)网络:ERR_INTERNET_DISCONNECTED | 拿来 | ngsw-worker.js:2795 |
| ngsw.json?ngsw-cace-bust=0.8890368493450784 | /ngsw.json | https://example.com/ngsw.json?ngsw-cache-bust=0.8890368493450784 | (失败的) | 拿来 | ngsw-worker.js:2795 |
PWA 仍然可以毫无问题地安装。
当从头开始创建新的 Angular 项目时(对于 Angular 版本 10.2.4),也会显示此警告:
ng new
ng add @angular/pwa
Run Code Online (Sandbox Code Playgroud)
关于导致此警告和失败的网络获取的原因的任何想法......?