We've been warning developers for 8 months (since this CL which is included from M54) by making sendBeacon throw on Dev releases
On Wed, May 10, 2017 at 1:26 PM, 'Takeshi Yoshino' via blink-network-dev <blink-network-dev@chromium.org> wrote:We've been warning developers for 8 months (since this CL which is included from M54) by making sendBeacon throw on Dev releasesIs there a deprecation warning on non-Dev releases?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
lgtm1
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Hi,I'm not sure I understand why the compatibility risk is low enough for this intent. As stated, it's at 0.08%, and it is a "fire and forget" mechansim,but the server logging of sites that use beacons would still break.
--
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw_TXzbpO_3g%3DwPH78hp9gC3UGFEALHJrV2UM3Djt5WO1w%40mail.gmail.com.
LGTM2. I think the security and predictability improvements, and that it wouldn't directly break user experience, are enough to justify this change.Sounds like Firefox already has the behavior described in this Intent? Could you clarify?
--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-dev+unsubscribe@chromium.org.
To post to this group, send email to blink-ne...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-network-dev/CADnb78h0w%2BEKqGnCph6Mer%3DGAFK4Ld%3D7ck6mfNs9tG0-m49yNw%40mail.gmail.com.
I understand silently disabling might be fine and better for some users, but I don't think we can say that's true for most.I'd like to make it louder by throwing than just logging for higher probability that developers notice the change and take some action based on their priority.
On Thu, May 18, 2017 at 3:25 PM, PhistucK <phis...@gmail.com> wrote:
Now that I think about it, throwing (as opposed to a silent error with a console warning/error but still not throwing) might be inappropriate here. It can break the execution of the script which may, for example, write to localStorage or do anything else following the sendBeacon call (it does not even have to happen at unload/beforeunload).
☆PhistucK
On Tue, May 16, 2017 at 5:03 PM, Anne van Kesteren <ann...@annevk.nl> wrote:
On Tue, May 16, 2017 at 3:53 PM, Mike West <mk...@chromium.org> wrote:
> Firefox sends CORS preflights for Beacon requests with a non-simple
> `Content-Type`. The proposal here is for Blink to fail these requests until
> such time as we can send preflights as well.
To be pedantic, Firefox preflights for Blob objects. The plan is to
make that a Content-Type-based check in
https://bugzilla.mozilla.org/show_bug.cgi?id=1289387 once Chromium has
shipped some improvements, such as the one being discussed here.
--
https://annevankesteren.nl/
--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-...@chromium.org.
To post to this group, send email to blink-ne...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/034b36ec-b8ca-4f33-a0e9-24d2248a4723%40chromium.org.
I'm on Chrome 61.0.3163.91. The fix breaks same-origin requests using a Blob with a custom "type". For example, we use: var serializedData = JSON.stringify(data); var rawData = new Blob([serializedData], { type: 'application/json' }); // This is a same-origin request! navigator.sendBeacon('/track', rawData); --- This code is now throwing the exception: "Failed to execute 'sendBeacon' on 'Navigator': sendBeacon() with a Blob whose type is not any of the CORS-safelisted values for the Content-Type request header is disabled temporarily. See http://crbug.com/490015 for details." In Firefox 55.0.3, the request is sent correctly (and of course without an exception). There is *no* preflight CORS request sent since it's not cross-origin. However, if we change to a different origin (e.g. "127.0.0.1" instead of "localhost"), the preflight request is sent as expected. This new behavior in Chrome is undesirable because it assumes that every request is CORS. As a workaround, we catch exceptions caused by "sendBeacon" and retry with "application/x-www-form-urlencoded" (e.g. using "jQuery.param()" instead of "JSON.stringify()"). If there was no exception (like other people are saying), our fallback to fetch/AJAX would have worked.
Reviving this old thread.As Out-of-Renderer CORS (OOR-CORS) is rolling out, I think we are ready to undo this temporarily remove on M81. Do I need a separate intent thread?
--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-network-dev/072aa916-9b7d-4070-af2e-68fa3c6855ef%40chromium.org.