Inspecting web app manifests - Firefox Developer Tools 编辑

In this article we will look at inspecting app manifests using the Firefox DevTools Application panel.

When you open the Application panel’s Manifest view on a page that doesn't have an app manifest successfully deployed, you'll get the following output shown:

default manifest view saying that you need to add a manifest to inspect it.

Deploying a manifest

To get a manifest deployed successfully, you need to include a <link> element in the <head> of your document that points to your .webmanifest file:

<link rel="manifest" href="/manifest.webmanifest">

The .webmanifest extension is recommended in the spec, and should be served with an application/manifest+json mime type, although browsers generally tend to support manifests with other appropriate extensions like .json (mime type: application/json).

You also need to make sure the JSON inside the file is of the correct format. You can test this using the Web Manifest Validator.

Inspecting your manifest

If your manifest is deployed successfully, you should end up with a display like the following on the Manifest view:

manifest view showing a deployed manifest, with identity, presentation, and icon information shown

From here, you can inspect all the information in the manifest in an easy-to-digest way, making sure that it is all correct. It provides a link to the manifest file at the top which when clicked on brings up the JSON in a new tab.

It also loads all the icon files into the view, so you can see the relative size of them all, and any other information associated with them.

List of manifest members

We won't provide an exhaustive list of all the members that can appear in a web manifest here; you can already find that in our web manifest documentation.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:109 次

字数:3073

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文