Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fetch over XMLHttpRequest in plausible.js #5025

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

macobo
Copy link
Contributor

@macobo macobo commented Jan 28, 2025

fetch allows us to use the keepalive flag, which more reliably delivers data to us. It's also required for reliable scroll depth capturing down the line.

The only major browser not to support fetch is Internet Explorer. Clients who care about IE traffic can use the .compat variant of our script (documented in
https://plausible.io/docs/script-extensions#scriptcompatjs). As of this commit, IE makes up less than ~0.003% of incoming traffic to plausible.

@ukutaht should we make an announcement on the product side or is the changelog sufficient?

`fetch` allows us to use the keepalive flag, which more reliably
delivers data to us. It's also required for reliable scroll depth
capturing down the line.

The only major browser not to support fetch is Internet Explorer.
Clients who care about IE traffic can use the `.compat` variant of our
script (documented in
https://plausible.io/docs/script-extensions#scriptcompatjs). As of this
commit, IE makes up less than ~0.003% of incoming traffic to plausible.
@macobo macobo requested a review from ukutaht January 28, 2025 10:52
Copy link
Contributor

@ukutaht ukutaht 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 👍 I think the changelog entry is sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants