W3C home > Mailing lists > Public > public-tracking@w3.org > February 2012

ACTION-95, ISSUE-118: asynchronous version of site-specific exception API

From: Nicholas Doty <npdoty@w3.org>
Date: Tue, 7 Feb 2012 21:45:02 -0800
Message-Id: <F330FD2C-4EC3-4388-A961-DE0A0035DB23@w3.org>
To: "public-tracking@w3.org (public-tracking@w3.org)" <public-tracking@w3.org>
The user-agent-managed site-specific exception API should be asynchronous to provide the opportunity for user agents to prompt users for their permission (though they may not always do this). The following IDL/proposal uses a callback so that sites can continue execution while waiting for a response to their permissions request.

(I'll send out a longer HTML snippet with the other changes to this API proposed by Mozilla/Microsoft folks hopefully very soon.)


        <dl class="idl" title='[NoInterfaceObject] interface NavigatorDoNotTrack'>
          <dt>void requestSiteSpecificTrackingException(in sequence&lt;DOMString> arrayOfDomainStrings, in TrackingResponseCallback callback)</dt>
		  <dd>Called by a page to request or confirm a site-specific tracking exception.</dd>
        <dl class="idl" title='[Callback, NoInterfaceObject] interface TrackingResponseCallback'>
          <dt>void handleEvent(in boolean granted)</dt>
          <dd><code>granted</code> is true if the user granted all of the exceptions,
                      false if any exceptions were not granted.</dd>        

          The <code>requestSiteSpecificTrackingException</code> method takes
          two arguments: <code>arrayOfDomainStrings</code> a JavaScript array
          of strings and <code>callback</code>, a method which will be called when the request is completed. Each string in <code>arrayOfDomainStrings</code> specifies a document origin of a tracking
          element used by the site invoking this function. The special string
          <code>*</code> signifies all document origins. When called, the <code>requestSiteSpecificTrackingException</code> method MUST return immediately and then asynchronously determine whether the user grants the requested exceptions.
          User agents MAY provide a user interface prompting the user to
          choose whether to provide site-specific exceptions to Do Not Track
          for the requested origins, or, if pre-configured to accept or reject
          these permissions, respond with the user's previously
          configured preference.
		<p class="note">Sites should be aware that a user agent may interactively prompt the user when this method is called and sites should not assume that the callback function will always be called immediately.</p>
Received on Wednesday, 8 February 2012 05:47:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:38:33 UTC