Google Lighthouse converts a relevant situation into a warning like the one below and sends it to you:
notification.requestPermission(), it is reported that the notification permission already exists. In this case, the audit is completed without a detailed observation.
In such a case, Lighthouse, which cannot see a new notification permission request, may fail to audit. So before starting an audit, be sure to reset the previously given permissions.
Lighthouse provides you with the requests for notification permissions line by line with the URL.
So, how should the notification permissions request be submitted?
There should not be a
notification.requestPermission() among the code running during the page load. For a better UX,
- Request permission with a specific notification view.
- In addition, the request for permission should be shaped by the user’s choice of notification type.
Test Your Website Issues
You can quickly analyze your site