You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation does not specify a fetch priority when the Segment API sends data to the server. Consequently, the browser defaults to selecting the priority, which in several web applications, tends to be 'high'.
Desired Behavior: We aim to assign a low priority to analytics network calls. This adjustment will allow the browser to prioritize other critical resources more effectively.
However, at present, there is no mechanism available to customize the fetch priority.
fetch(url, {
keepalive: config?.keepalive,
headers: { 'Content-Type': 'text/plain' },
method: 'post',
body: JSON.stringify(body),
// priority attribute is not sent currently, Defaults to auto, when not set
})
The current implementation does not specify a fetch priority when the Segment API sends data to the server. Consequently, the browser defaults to selecting the priority, which in several web applications, tends to be 'high'.
Desired Behavior: We aim to assign a low priority to analytics network calls. This adjustment will allow the browser to prioritize other critical resources more effectively.
However, at present, there is no mechanism available to customize the fetch priority.
https://github.com/segmentio/analytics-next/blob/%40segment/analytics-signals%401.8.0/packages/browser/src/plugins/segmentio/fetch-dispatcher.ts#L14
Reference: https://developer.mozilla.org/en-US/docs/Web/API/RequestInit#priority
The text was updated successfully, but these errors were encountered: