Chrome开发人员工具无法检测到清单

时间:2018-06-30 16:34:54

标签: javascript google-chrome-devtools manifest pwa

我有 manifest.json ,并用<link rel="manifest" href="./manifest.json">添加到了我的 HTML 中。

我认为一切都很好,但是我不知道为什么chrome开发工具无法检测到我的清单!

我的 manifest.json

{
    "name": "Arman News",
    "short_name": "Ar News",
    "description": "This is my first try to make PWA webstie.",
    "theme_color": "#ffffff",
    "background_color": "#ffffff",
    "display": "standalone",
    "Scope": "/",
    "start_url": ".",
    "icons": [
      {
        "src": "img/icons/Icon-192.png",
        "sizes": "192x192",
        "type": "image/png"
      },
      {
        "src": "img/icons/Icon-512.png",
        "sizes": "512x512",
        "type": "image/png"
      }
    ],
    "splash_pages": null
  }

2 个答案:

答案 0 :(得分:0)

确保index.html和manifest.json都在同一文件夹中,并按以下方式引用它,

"Data"

没有到您网站的实际链接,这是我们可以为给定代码提供的所有调试。如果这样做不能解决问题,请发布网络标签的屏幕截图,以了解manifest.json发生了什么。

答案 1 :(得分:0)

尝试浏览清单https://yourweb/manifest.json或.webmanifest

如果KO添加以下内容:

  • 在您的服务器配置中添加.json mime类型 .json | application / json

  • 或将manifest.json重命名为manifest.webmanifest .webmanifest | application / manifest + json

如果可以,请在“应用程序”下的“开发工具”中找到清单,然后

相关问题