Date: Sat, 08 Jun 2013 07:43:55 +0900 (JST) From: Hiroki Sato <hrs@FreeBSD.org> To: trhodes@FreeBSD.org Cc: wblock@wonkity.com, svn-doc-head@FreeBSD.org, gjb@FreeBSD.org, svn-doc-all@FreeBSD.org, doc-committers@FreeBSD.org Subject: Re: svn commit: r41848 - head/en_US.ISO8859-1/htdocs/layout/js Message-ID: <20130608.074355.1943574601566819598.hrs@allbsd.org> In-Reply-To: <20130607113436.4dc1cbc3.trhodes@FreeBSD.org> References: <CAF6rxg=tnyCyLP50RpO8j20jbnGO_Mycb7aq5P3pRVz9NtvokA@mail.gmail.com> <20130607.092534.356568932887378565.hrs@allbsd.org> <20130607113436.4dc1cbc3.trhodes@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Sat_Jun__8_07_43_55_2013_886)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tom Rhodes <trhodes@FreeBSD.org> wrote in <20130607113436.4dc1cbc3.trhodes@FreeBSD.org>: tr> On Fri, 07 Jun 2013 09:25:34 +0900 (JST) tr> Hiroki Sato <hrs@FreeBSD.org> wrote: tr> tr> > Eitan Adler <eadler@freebsd.org> wrote tr> > in <CAF6rxg=tnyCyLP50RpO8j20jbnGO_Mycb7aq5P3pRVz9NtvokA@mail.gmail.com>: tr> > tr> > ea> On 6 June 2013 16:28, Hiroki Sato <hrs@freebsd.org> wrote: tr> > ea> > tr> > ea> > null, "", and undefined are evaluated as false in Javascript. tr> > ea> > tr> > ea> Javascript has an odd concept of true and false: 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> > 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> > tr> > If so, I think something like the following is needed. tr> > tr> > var dnt = window.navigator.msDoNotTrack || window.navigator.doNotTrack; tr> > var allow_track = (dnt && dnt == 'yes'|| dnt == 1); tr> > tr> > -- Hiroki tr> > tr> 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. -- Hiroki ----Security_Multipart(Sat_Jun__8_07_43_55_2013_886)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlGyYisACgkQTyzT2CeTzy2cYACfQsbq1m4koGAph8BggvwNgleW 9PMAoJ3OmHgZOHf0TkkZUBQ02dhxUCvo =9cyA -----END PGP SIGNATURE----- ----Security_Multipart(Sat_Jun__8_07_43_55_2013_886)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130608.074355.1943574601566819598.hrs>