How to remove chrome icon add to home screen prompt

纵饮孤独 提交于 2019-12-24 23:53:31

问题


I am working with PWA app and I have an issue with add to home screen prompt. I need to remove the chrome badge from the app icon underneath.

Here is my manifest.json

{
  "short_name": "App Name",
  "name": "App Name",
  "icons": [
    {
      "src": "...",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "...",
      "sizes": "512x512",
      "type": "image/png"
    },
    {
      "src": "...",
      "sizes": "64x64",
      "type": "image/png"
    }
  ],
  "start_url": "/login",
  "display": "standalone",
  "theme_color": "#ffc107",
  "background_color": "#ffffff"
}

How can I do that?


回答1:


HTTPS is not optional for a PWA

All HTTP sites have the Add To Home Screen (A2HS) option in the menu
When those are installed, they have the added chrome badge on the icon

When HTTPS (and a valid PWA), you should also see the automatic Chrome A2HS prompt
And the installed PWA icon will NOT have the chrome badge added to it

If you want to test this, there are free HTTPS hosts like Glitch

my test



来源:https://stackoverflow.com/questions/58037836/how-to-remove-chrome-icon-add-to-home-screen-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!