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

Testing the add to homescreen experience in Chrome

The developer experience would not be complete without the ability to test the add to homescreen experience. Chrome has added tooling which allows you to see how your web manifest file is interpreted and manually trigger the prompt.

Launch Chrome's developer tools by using F12 and select the Application tab. There are many choices to help you debug various aspects of a progressive web application. Under Application, there is a Manifest choice. This will display the properties of your web manifest file, including each icon. This is a quick way for you to determine if your manifest is interpreted correctly, as you can see in the following screenshot:

There is also a link to manually trigger the Add to Home Screen experience. Check out the following screenshot:

Clicking the link in the developer tools will trigger the Add to homescreen prompt. Take a look at the following screenshot:

The best way to test your experience is to deploy your progressive web app to the cloud, with HTTPS enabled. Open your site in a PWA supporting browser and do your best to adhere to the rules to trigger the add to homescreen prompt.

It is always a best practice to test your site across multiple devices. I recommend at least one iPhone, Android, and desktop with multiple browsers. Having these real user experiences available gives you confidence that your deployed PWA works as expected.

主站蜘蛛池模板: 抚顺市| 九龙县| 仁寿县| 隆林| 中超| 大理市| 兴安县| 南昌市| 中阳县| 五家渠市| 仁化县| 田阳县| 通化市| 敦煌市| 南澳县| 南开区| 金堂县| 太原市| 博兴县| 华阴市| 洪洞县| 六枝特区| 广丰县| 新宾| 九江市| 凉城县| 滨海县| 夏津县| 延庆县| 晋中市| 长汀县| 平原县| 潜山县| 武隆县| 衡东县| 安宁市| 历史| 伊宁市| 共和县| 华池县| 平泉县|