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

Re: navigator.doNotTrack

From: Justin Lebar <jlebar@mozilla.com>
Date: Wed, 11 Apr 2012 17:31:17 -0400
Message-ID: <CAFWcpZ6HbfAv1e15oePgFVQBN1q-r9HaZSTu0yLs4zdOY_qQhw@mail.gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: Tracking Protection Working Group WG <public-tracking@w3.org>
>> But I don't see how extensions would fit in here without breaking
>> existing logic.  Suppose you added a "foo" extension, so now people
>> send "DNT: 1 foo".  If we reflected this verbatim in the DOM, then
>> every site which checks for navigator.doNotTrack == "1" will break.
>
> Yes, so don't do that.  There is no "existing logic".  There are no sites
> that check navigator.doNotTrack == "1" right now.  I don't care about
> the potential ability for web developers to write bad code given
> that there is no current documentation that they can copy that tells
> them how to test it properly.  The standard specifies it properly, so
> we just need to make sure the implementations and examples do the same.

It's my experience at Mozilla that web developers will assume anything
and everything they can about the interfaces exposed to them.  "Yes,
so don't do that" is not a solution for the Web.  None of us here will
be able to ensure that all implementations and examples do

  navigator.doNotTrack.indexOf("1") == 0

instead of

  navigator.doNotTrack == "1".

Indeed, the former is so counter-intuitive, I'd expect a lot of
websites to use the latter, even if we deem it to be incorrect.

>> Or alternatively, suppose we added DNT: 2.  Again, websites would
>> handle this incorrectly if we returned it in navigator.doNotTrack,
>> because many sites would do an if {} elseif {} else {}.
>>
>> To be clear, it's a problem that web servers would have to be updated
>> to handle this new DNT field, but at least there's some hope of
>> getting that right, since there are only a handful of web servers.
>> With the Web, there's no hope of getting legacy pages updated.
>
> There are no legacy DNT pages.

But there will be, right?

Again, my concern is that web pages will use this interface
incorrectly, and then we'll be stuck in a position where we can't
change the interface without breaking those pages.  Web browsers are
loath to "break the Web" even when pages are using an interface
"incorrectly".

>> It seems to me that we'd want to expose an extension as
>> navigator.doNotTrackFoo, or perhaps
>> navigator.doNotTrackExtensions['foo'], or something other than
>> navigator.doNotTrack.
>>
>> Perhaps I'm missing the point of these extensions?
>
> The whole point of having extensibility is that we don't know what
> extensions will be needed.  This is not a problem.
>
> If you implement it according to the spec, then the test will be
> future-proof.  If you don't implement the test as specified, then the
> test will fail.

That is precisely what, for the purposes of the DOM, I would like to
avoid.  Again, it is my experience that if we do not avoid this, then
we will be in a position in the future where we are unable to make
changes because those changes will break sites.

-Justin
Received on Wednesday, 11 April 2012 21:32:10 UTC

This archive was generated by hypermail 2.3.1 : Friday, 21 June 2013 10:11:27 UTC