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

Always use sendBeacon instead of Image where available #2446

Closed
cramforce opened this issue Mar 4, 2016 · 10 comments
Closed

Always use sendBeacon instead of Image where available #2446

cramforce opened this issue Mar 4, 2016 · 10 comments

Comments

@cramforce
Copy link
Member

Why would one ever want to use Image instead of sendBeacon?

I think we should always use sendBeacon if we can.

@avimehta @rudygalfi Any opinions?

@avimehta
Copy link
Contributor

avimehta commented Mar 4, 2016

yes. Agreed. GA has an open bug where for sendBeacon requests, our servers respond before we get the full request and that has made us not go full sendBeacon. but overall, we would want to go full sendBeacon where possible.

@cramforce
Copy link
Member Author

I don't fully understand: What does "our servers respond before we get the full request" mean?

@rudygalfi
Copy link
Contributor

Is the proposal to change the transport config options?

@cramforce
Copy link
Member Author

Basically to kill the image transport and only use it if sendBeacon is not available.

My main question is: Is there any reason not to do this? Does the image transport do anything that sendBeacon does not?

@avimehta
Copy link
Contributor

avimehta commented Mar 4, 2016

Is there any reason not to do this? Does the image transport do anything that sendBeacon does not?

  1. sendBeacon is not supported on all browsers.
  2. Not many analytics vendors support post yet.

@rudygalfi
Copy link
Contributor

Is @avimehta's latest response sufficient or does this need more discussion?

@rudygalfi rudygalfi added this to the Pending Sprint Slotting milestone Mar 24, 2016
@rudygalfi rudygalfi assigned cramforce and unassigned avimehta Apr 4, 2016
@cramforce cramforce modified the milestones: Backlog, Next May 23, 2016
@igrigorik
Copy link

If sendBeacon supported GET, would this allow us to make it the default for all browsers that support it?

@dvoytenko
Copy link
Contributor

@igrigorik I'd think so. I can't think of any reason then not to use it as a default.

@cramforce
Copy link
Member Author

Not going there until w3c/beacon#22 is resolved

@lannka
Copy link
Contributor

lannka commented Feb 9, 2017

A proposal to implement this is here: #7096

@lannka lannka closed this as completed Feb 9, 2017
@lannka lannka removed this from Backlog in Analytics Feb 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants