官术网_书友最值得收藏!

Adding a manifest

Adding a web manifest file should be the first step in upgrading an existing website. You can create your site's manifest file in a matter of minutes. In the tooling chapter, I will review a few online resources that can help automate the process.

Registering a PWA's web manifest requires a special link element in the HTML head element. The following code shows how the 2048 manifest file is registered:

<head>
….
<link rel="manifest" href="manifest.json">
</head>

If you are familiar with referencing a style sheet, this syntax should look familiar. The difference is the rel attribute value being manifest. The href value points to the manifest file. You are free to name it anything, but manifest is the most common name.

The next chapter will go into more manifest file details. You can reference the project's manifest.json file to see how the 2048 game is configured. It contains the application's name, default URL, primary colors, and an array of icon image references.

主站蜘蛛池模板: 泰安市| 云林县| 兴文县| 盐山县| 娄烦县| 乌审旗| 崇礼县| 岳普湖县| 沙雅县| 张掖市| 习水县| 商水县| 扎鲁特旗| 丹寨县| 永吉县| 汉阴县| 登封市| 阿坝| 荃湾区| 三明市| 台南县| 平原县| 固原市| 太和县| 淳化县| 石泉县| 乌什县| 锡林浩特市| 大城县| 汉源县| 托里县| 柏乡县| 桦甸市| 分宜县| 定结县| 山丹县| 留坝县| 信宜市| 新龙县| 周至县| 延吉市|