- Progressive Web Application Development by Example
- Chris Love
- 161字
- 2021-08-05 10:33:16
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.
- 物聯(lián)網(wǎng)與北斗應(yīng)用
- 通信網(wǎng)絡(luò)基礎(chǔ)與設(shè)備
- 物聯(lián)網(wǎng)安全(原書第2版)
- 數(shù)字通信同步技術(shù)的MATLAB與FPGA實(shí)現(xiàn):Altera/Verilog版(第2版)
- 網(wǎng)管員必讀:網(wǎng)絡(luò)管理(第2版)
- 光纖通信系統(tǒng)與網(wǎng)絡(luò)(修訂版)
- VMware NSX網(wǎng)絡(luò)虛擬化入門
- 端到端QoS網(wǎng)絡(luò)設(shè)計(jì)
- 一本書讀懂物聯(lián)網(wǎng)
- Hands-On Bitcoin Programming with Python
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)
- 圖解物聯(lián)網(wǎng)
- 物聯(lián)網(wǎng)與智慧農(nóng)業(yè)
- INSTANT Social Media Marketing with HootSuite
- 物聯(lián)網(wǎng):感知、傳輸與應(yīng)用