当我尝试“添加到主屏幕”时,我在控制台中收到以下错误消息
Site cannot be installed: no matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest
Run Code Online (Sandbox Code Playgroud)
注册服务工作者确实很顺利,似乎没问题: chrome application-Service Worker
它必须与范围有关,因为我在子域(/webconnect/)中运行我的网站:
该清单具有以下范围和 start_url 值:
“范围”:“/webconnect/”
“start_url”:“/webconnect/index.html”
我已经完成了故障排除部分,但这对我没有多大帮助:
Troubleshooting
If after testing you are getting the following error in your console:
No matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start URL from the manifest
Then please make sure that 1. Your service worker is functioning properly and without errors, and 2. Your start_url matches an actual url of your website that loads. Else, you will never get the prompt to show!
Run Code Online (Sandbox Code Playgroud)
我是否缺少将网站添加到主页的特定 trcik?
| 归档时间: |
|
| 查看次数: |
7133 次 |
| 最近记录: |