简体   繁体   中英

How to remove chrome icon add to home screen prompt

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?

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在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM