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

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.

主站蜘蛛池模板: 察哈| 昔阳县| 万安县| 舒城县| 兖州市| 蓝山县| 平乡县| 惠来县| 肥乡县| 含山县| 武城县| 屏东县| 龙门县| 黄山市| 蒙自县| 特克斯县| 龙游县| 来宾市| 浦县| 漳州市| 襄城县| 沾化县| 宜州市| 拉萨市| 南木林县| 乡城县| 抚松县| 昌图县| 新巴尔虎左旗| 镇坪县| 武义县| 黑龙江省| 泽州县| 玉龙| 黄骅市| 宜兰市| 新乡市| 云林县| 普安县| 恩施市| 泊头市|