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

Validating web manifest files

The web manifest is a simple JSON document, but it's easy to make typos or forget things. If your site is not properly registering the manifest file, you will need to troubleshoot the issue. Fortunately, there are a few resources to help you validate your file.

Google hosts a simple online validator (https://manifest-validator.appspot.com) where you can enter either a URL or just paste the manifest code into the page. It will parse your manifest and let you know if there is an issue:

The nodejs Web Manifest Validator (https://github.com/san650/web-app-manifest-validator) is a module you can include in your automated testing workflow to validate a manifest file. It is a couple of years old, so you may need to fork the project and update it if you are using newer manifest features. Remember that the manifest specification is not final and can and will change over time.

These are not the only tools. There are a few other node modules available as well as Lighthouse and Sonar. I will cover those tools in Chapter 10, Service Worker Tools, along with PWA Builder, which can generate your manifest.

主站蜘蛛池模板: 宁乡县| 湖南省| 台北市| 余姚市| 吉林省| 台州市| 巨野县| 咸丰县| 丹东市| 德惠市| 通州区| 肥乡县| 博湖县| 勐海县| 宁化县| 玛多县| 吉水县| 乐至县| 许昌县| 阿鲁科尔沁旗| 石家庄市| 兴文县| 普兰店市| 稻城县| 宿迁市| 紫金县| 民丰县| 定日县| 衢州市| 当阳市| 普兰县| 松原市| 新和县| 阿克陶县| 诏安县| 名山县| 天峨县| 凤山市| 孟村| 察哈| 绥宁县|