<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement new &quot;Beacon&quot; W3C spec"
   href="https://bugs.webkit.org/show_bug.cgi?id=147885">147885</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Implement new &quot;Beacon&quot; W3C spec
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>irae&#64;irae.pro.br
          </td>
        </tr></table>
      <p>
        <div>
        <pre>User metrics is a very common way of measuring a product success, be it a small startup or products like Yahoo Search, which I currently work on.
Most of the motivation for this new spec is expressed in the spec itself and other browser vendors are already onboard and have this Last Call Editor's draft spec on their stable version of the browser.

<a href="http://www.w3.org/TR/beacon/">http://www.w3.org/TR/beacon/</a>

I would like to illustrate our particular use case in order to help WebKit prioritize this request. In legacy Yahoo Search we track most of the events server-side, even before HTML is sent to the client. This is fine for the &quot;legacy&quot; web, almost without Javascript. The current iteration of Yahoo Search is a so called &quot;Single Page App&quot;, and all the runtime and even navigation is handled by Javascript and updates to the page are using XHR to fetch data. Moving user metrics aggregation to the client has been a challenge and we do variations on the techniques described in the aforementioned spec.

In our particular case, we would appreciate the `navigator.sendBeacon` API not only for the reasons stated there, but also we are very found of the following paragraph:

<span class="quote">&gt; &quot;The User Agent SHOULD transmit data at the earliest available opportunity, but
&gt; MAY prioritize the transmission of data lower compared to other network
&gt; traffic. The User Agent SHOULD make a best effort attempt to eventually transmit
&gt; the data.&quot;</span >

Specially in areas with low coverage of cellular data access, this would mean a lot perceived performance improvements for the end-user, as we could use the new API to send all user metrics data, not only the clicks that happened before unloading the document, and Safari could potentially hold this requests until user has higher bandwidth available. Our search results would potentially load faster, the website the user is navigating to would load faster.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>