Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Issue 360603 Implement Beacon API
Starred by 20 users Project Member Reported by igrigo...@chromium.org, Apr 7 2014 Back to list
Status: Fixed
Owner:
Closed: Sep 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug, Launch-OWP
Launch-Accessibility: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Status: ----
Launch-Test: ----
Launch-UI: ----



Sign in to add a comment
Spec: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html

Beacon offers a nice performance win for outbound link tracking, form submissions, etc., all of which are popular techniques used by any analytics vendors - e.g. Google Tag Manager injects custom JS to intercept form submissions and link clicks and times out after 200ms by default (if the action does not complete).  If/when Beacon is available the request can be queued up and fired asynchronously - no need to wait!

Mozilla has already implemented it [1] and will ship in their next stable release (June 10th). 

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=936340
 
Comment 1 by dxie@chromium.org, Apr 7 2014
Labels: Cr-Blink-Loader
Comment 2 by dxie@chromium.org, Apr 28 2014
Cc: dcheng@chromium.org jochen@chromium.org
Owner: sigbjo...@opera.com
Status: Started
Assigning to the engineer from Opera who filed the intent to implement.
Added http://www.chromestatus.com/features/6668316898754560 for navigator.sendBeacon.

(Someone has already added http://www.chromestatus.com/features/5517433905348608 ; unclear why that hasn't been communicated.)
Project Member Comment 5 by bugdroid1@chromium.org, May 11 2014
The following revision refers to this bug:
  http://src.chromium.org/viewvc/blink?view=rev&rev=173837

------------------------------------------------------------------
r173837 | sigbjornf@opera.com | 2014-05-11T14:51:39.262456Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/PingLoader.cpp?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/resources/save-beacon.php?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/beacon/NavigatorBeacon.idl?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-detached-no-crash.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-cookie.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/beacon/NavigatorBeacon.cpp?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/beacon?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/RuntimeEnabledFeatures.in?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/resources/beacon-detached-no-crash-new-window.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-allowance-expected.txt?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/frame/Settings.in?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/network/FormData.cpp?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-same-origin-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/beacon?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-cross-origin-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/BeaconLoader.h?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-allowed.html?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/beacon/beacon-basic-expected.txt?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/PingLoader.h?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-redirect-to-blocked-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-allowance.html?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/resources/redir.php?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/resources/check-beacon.php?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-same-origin.html?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLAnchorElement.cpp?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-cross-origin.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/modules/beacon/NavigatorBeacon.h?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/modules.gypi?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/fetch/FetchInitiatorTypeNames.in?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-blocked-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-cookie-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/navigation/beacon-detached-no-crash-expected.txt?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/loader/BeaconLoader.cpp?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/beacon/beacon-basic.html?r1=173837&r2=173836&pathrev=173837
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/http/tests/security/contentSecurityPolicy/connect-src-beacon-redirect-to-blocked.html?r1=173837&r2=173836&pathrev=173837
   M http://src.chromium.org/viewvc/blink/trunk/Source/platform/network/FormData.h?r1=173837&r2=173836&pathrev=173837

Implement navigator.sendBeacon()

This provides support for the Beacon API,

 https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/Beacon/Overview.html

allowing async transmission of data using navigator.sendBeacon().

R=abarth@chromium.org,mkwst@chromium.org
BUG= 360603 

Review URL: https://codereview.chromium.org/232053005
-----------------------------------------------------------------
Comment 6 by sigbjo...@opera.com, May 12 2014
To support CSP checking of Beacon redirects, the checking needs to happen in the browser process. Filed https://code.google.com/p/chromium/issues/detail?id=372197 for that.
Comment 7 by sigbjo...@opera.com, Jul 24 2014
Labels: Type-Launch-OWP OWP-Design-No OWP-Type-NewAPI OWP-Standards-OfficialSpec
Sigbjorn - did this ship?   Looks like it got approval to ship, but doesn't appear to have made it out yet.
Anything else we're waiting on?


I'd love to include this in our messaging around Sync XHR.
Comment 9 by sigbjo...@opera.com, Sep 20 2014
navigator.sendBeacon() is now a stable feature, https://code.google.com/p/chromium/issues/detail?id=402991 handled that separately, so it'll be in M39.

Closing this bug; if there's anything OWP related that also needs to be addressed for this feature, will follow up on that.
Status: Fixed
Cc: rsch...@chromium.org
Issue 340759 has been merged into this issue.
Sign in to add a comment