Missed the action at the 2018 Chrome Dev Summit? Catch up with our playlist on the Google Chrome Developers channel on YouTube. Watch now.

Avoids Requesting The Notification Permission On Page Load

Overview

As explained in What Makes a Good Notification, good notifications are timely, relevant, and precise. If your page asks for permission to send notifications on page load, those notifications may not be relevant to your users or precise to their needs. A better user experience is to offer to send users a specific type of notification, and to present the permissions request after they opt-in.

Recommendations

Under URLs, Lighthouse reports the line and column numbers where your code is requesting permission to send notifications. Remove these calls, and tie the requests to user gestures instead.

More information

If notification permissions was already granted or denied to a page before Lighthouse's audit, Lighthouse cannot determine if the page requests notification permissions on page load. Reset the permissions and run Lighthouse again. See Change website permissions for more help.

Lighthouse collects the JavaScript that was executed on page load. If this code contains calls to notification.requestPermission(), and notification permission was not already granted, then notification permission was requested.

Feedback

Was this page helpful?
Yes
What was the best thing about this page?
It helped me complete my goal(s)
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had the information I needed
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had accurate information
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was easy to read
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
Something else
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
No
What was the worst thing about this page?
It didn't help me complete my goal(s)
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was missing information I needed
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It had inaccurate information
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
It was hard to read
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.
Something else
Thank you for the feedback. If you have specific ideas on how to improve this page, please create an issue.