How to Use the berforeinstallprompt Event to Create a Custom PWA Add to Homescreen Experience

How to Use the berforeinstallprompt Event to Create a Custom PWA Add to Homescreen Experience

One of the bigger announcements made at Google I/O 2018 was the end of Chrome automatically prompting users to add Progressive Web Apps (PWA) to their home screen. This has probably gone unnoticed by many after being impressed with Google Duplex. But for business owners and developers this is big news and requires new thinking and coding for progressive web apps.

Now you are responsible to trigger a prompt to the user, not Chrome. But there is an event, beforeinstallprompt, you can intercept to create the prompt.

This is a big switch from the workflow Google has trained us to expect in recent years. But actually puts them more inline with the add to homescreen processes implemented by other browsers like FireFox and Samsung Internet.

Now instead of Chrome determining when to prompt the user, you controll when the user is prompted, it triggers the beforeinstallprompt event in the background.

You need to build a user experience triggered by the 'beforeinstallprompt' event. I will give you a simple example later in this post.

[Continue Reading]

要查看或添加评论,请登录

Chris Love的更多文章

社区洞察

其他会员也浏览了