svn commit: r41848 - head/en_US.ISO8859-1/htdocs/layout/js
hrs at FreeBSD.org
Fri Jun 7 22:44:56 UTC 2013
Tom Rhodes <trhodes at FreeBSD.org> wrote
in <20130607113436.4dc1cbc3.trhodes at FreeBSD.org>:
tr> On Fri, 07 Jun 2013 09:25:34 +0900 (JST)
tr> Hiroki Sato <hrs at FreeBSD.org> wrote:
tr> > Eitan Adler <eadler at freebsd.org> wrote
tr> > in <CAF6rxg=tnyCyLP50RpO8j20jbnGO_Mycb7aq5P3pRVz9NtvokA at mail.gmail.com>:
tr> > ea> On 6 June 2013 16:28, Hiroki Sato <hrs at freebsd.org> wrote:
tr> > ea> >
tr> > ea> >
tr> > ea> null, an empty string, +0, -0, and NaN, and false are the 'false' values.
tr> > ea>
tr> > ea> An object will return true.
tr> > I see. I am not familiar with DNT implementation, but is there a www
tr> > browser to define navigator.doNotTrack as the value "false"?
tr> > If so, I think something like the following is needed.
tr> > var dnt = window.navigator.msDoNotTrack || window.navigator.doNotTrack;
tr> > var allow_track = (dnt && dnt == 'yes'|| dnt == 1);
tr> > -- Hiroki
tr> I was assuming based on the discussion that we need to perform
tr> more than a single check on this, but will this one actually
tr> work? It just looks odd to me. Note: Not a js guy either.
I confirmed it works on the browsers. In my understanding, we have
to check if the object is defined, then it is "1" or "yes", and
otherwise consider DNT is not enabled. I agree that checking if it
is true or not is wrong as Eitan says.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the svn-doc-all