Interventions
Web applications are constantly making requests to the Browser. Play this video, open that page, scroll there, show this message. Some of these requests can be harmful and Browsers have the ability to block requests, not only for security and performance reasons but also if a request might cause user annoyance.
Intervention should be minimized in order to give users a better experience and the first step is to know what is causing it. Chrome maintains a list of what can trigger an intervention, but trying to look for those in our codebase can be time-consuming and easy to miss.
The good news? The new Reporting API specification from the W3C gives browsers the ability to send Intervention reports to a server, which is a lot more consistent and useful.
Does your website have Intervention reports enabled? Check it now.
Practical Example
To enable Intervention reports all we have to do is add a new HTTP response header.
Report-To: {"group":"default","endpoints":[{"url":"https://yoursite.ingest.repointhub.com/report"}],"max_age":86400,"include_subdomains":true}
Reporting-Endpoints: default="https://yoursite.ingest.repointhub.com/report"
The setup above will tell browsers to send Intervention reports to RepointHub, so you can take proactive actions to prevent them from happening again.
