Skip to content

Change the default value for keepalive to false - #1359

Merged
Matus Tomlein (matus-tomlein) merged 1 commit into
release/4.0.0from
issue/keepalive_default_false
Oct 24, 2024
Merged

Change the default value for keepalive to false#1359
Matus Tomlein (matus-tomlein) merged 1 commit into
release/4.0.0from
issue/keepalive_default_false

Conversation

@matus-tomlein

Copy link
Copy Markdown
Contributor

This PR disables fetch keepalive by default.

The reason for this is the 64KB limit that browsers put on the keepalive requests. Although the default maxPostBytes is under this limit so we shouldn't run into for single requests, the limit is shared for parallel requests. We have seen this when testing in internal apps that have multiple initialized trackers that send events at once – this caused the requests to go into a pending state and fail.

A related problem was reported in #1355 – I think we were able to fix this for the case where there is a single tracker instance sending events, but not for the multiple tracker instances case. Since we can't fix it for that case, we can't keep the default setting to true.

@bundlemon

bundlemon Bot commented Oct 23, 2024

Copy link
Copy Markdown

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.28KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.45KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.21KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.22KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.15KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +104.79KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@jethron Jethro Nederhof (jethron) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

All "solutions" to this problem continue to be cursed, I guess. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants