Maj*_*jka 5 javascript github github-pages progressive-web-apps
我正在我的页面上工作PWA,我正在关注100%这个简单的代码框 - https://codelabs.developers.google.com/codelabs/add-to-home-screen/#0一切正常(在使用exmaple代码,也在我自己的网页上),但只有当我在localhost上测试它.在github页面上部署后,我遇到了很多错误:
GET https://[myusername].github.io/manifest.json 404 ()
(即路径可能有问题,因为我猜在清单文件之前应该有项目名称)Manifest: Line: 1, column: 1, Unexpected token.
(在devtools中我可以看到虽然它是正常的json文件,但它在我的localhost上工作正常);TypeError: Failed to register a ServiceWorker: A bad
HTTP response code (404) was received when fetching the script.
Manifest: Line: 1, column: 1, Unexpected token.
和Site cannot be installed: the manifest could not be fetched, is empty, or could not be parsed
.有任何想法吗?我不知道我做错了什么或者github页面出了什么问题......
归档时间: |
|
查看次数: |
1827 次 |
最近记录: |