作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试制作 PWA并且似乎没有任何东西可以使安装为 Web 应用程序按钮出现在我的网站上。
安装按钮如下所示,并显示在地址栏中:
当我去一个话语网站而不是我自己的网站时,它就会出现。
我脑子里有以下内容:
我的 list 位于根目录中,名为 manifest.webmanifest:
{
"name": "Example 1",
"short_name": "example1",
"display": "standalone",
"start_url": ".",
"background_color": "#000000",
"theme_color":"#ffffff",
"description": "Example web app.",
"icons": [{
"src": "https://www.example.com/test/images/icon_512.png",
"sizes": "512x512",
"type": "image/png"
}],
"share_target": {
"action":"/new-topic",
"method":"GET",
"enctype":"application/x-www-form-urlencoded",
"params": {
"title":"title",
"text":"body"}
}
}
最佳答案
我使用 Chrome Inspector 来调试我的网络应用 list :
https://developers.google.com/web/tools/chrome-devtools/progressive-web-apps
例如,它显示了我的 manifest.json 中的问题:
修复问题后,Chrome 地址栏上会出现 PWA 安装图标 :)
关于html - 渐进式 Web 应用程序未在浏览器栏中显示安装按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58985103/
我是一名优秀的程序员,十分优秀!