orb
orb copied to clipboard
Avoid ORB checks for navigator.sendBeacon
In Firefox Nightly I noticed that github.com has a resource blocked by ORB, which turns out to be from navigator.sendBeacon() in analytics-client.js (source file)
try {
if (navigator.sendBeacon) {
navigator.sendBeacon(this.collectorUrl, body);
return;
}
}
catch {
}
collectorUrl is https://collector.github.com/github/collect which returns a 204 No Content with x-content-type-options: nosniff per the Network tab.
Since sendBeacon responses aren't made available to JS it seems unnecessary to run ORB checks.
This isn't web observable I think. We could add a code path to handle it explicitly, but we'd need to be very careful not to run into any issues later.
Indeed. Maybe a note about navigator.sendBeacon() is sufficient here.