Skip to content

docs: add payload size limit note to navigator.sendBeacon()#43471

Merged
pepelsbey merged 7 commits intomdn:mainfrom
dsk-dev-ai:fix-sendbeacon-limit
Mar 19, 2026
Merged

docs: add payload size limit note to navigator.sendBeacon()#43471
pepelsbey merged 7 commits intomdn:mainfrom
dsk-dev-ai:fix-sendbeacon-limit

Conversation

@dsk-dev-ai
Copy link
Contributor

Fixes #42932

This PR adds a note about the payload size limit of navigator.sendBeacon(), clarifying that it is typically limited (~64 KB depending on the browser).

It also suggests using fetch() for larger data transfers.

@dsk-dev-ai dsk-dev-ai requested a review from a team as a code owner March 17, 2026 11:25
@dsk-dev-ai dsk-dev-ai requested review from pepelsbey and removed request for a team March 17, 2026 11:25
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Mar 17, 2026
@dsk-dev-ai
Copy link
Contributor Author

Hi, I’ve added a note about the payload size limit for navigator.sendBeacon(). Please let me know if any changes are needed. Thanks!

@dsk-dev-ai
Copy link
Contributor Author

Hi! This is my first contribution to MDN 😊

I’ve followed the contribution guidelines and ensured lint/tests pass.

Please let me know if any changes or improvements are needed — happy to update!

Thanks for your time 🙌

@pepelsbey pepelsbey requested a review from caugner March 19, 2026 07:59
@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2026

Preview URLs (1 page)

External URLs (1)

URL: /en-US/docs/Web/API/Navigator/sendBeacon
Title: Navigator: sendBeacon() method

(comment last updated: 2026-03-19 17:54:17)

Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

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

Looks good overall, thank you! I'm only slightly concerned about the "typically", since it's a spec-defined limit that browsers seem to follow.

dsk-dev-ai and others added 3 commits March 19, 2026 14:34
Co-authored-by: Vadim Makeev <hi@pepelsbey.dev>
Thanks for the feedback!

I've removed any ambiguity and clarified that the limit is spec-defined, updated the unit to KiB, and noted that the request fails if exceeded.

Please let me know if this looks good now 🙂
@caugner caugner removed their request for review March 19, 2026 16:50
@caugner
Copy link
Collaborator

caugner commented Mar 19, 2026

LGTM if it looks good to Vadim.

Thanks for the review!

I've updated the wording to reflect the spec-defined behavior more accurately and removed ambiguity.

Please let me know if this looks good now.
Copy link
Contributor Author

@dsk-dev-ai dsk-dev-ai left a comment

Choose a reason for hiding this comment

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

Hello Sir, Changes done, check it....

Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

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

Thank you 🙂

@pepelsbey pepelsbey merged commit eac9322 into mdn:main Mar 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

navigator.sendBeacon() page doesn't mention payload limit

4 participants