From owner-svn-doc-all@FreeBSD.ORG Fri Jun 7 22:44:56 2013 Return-Path: Delivered-To: svn-doc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1CF4CB9E; Fri, 7 Jun 2013 22:44:56 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) by mx1.freebsd.org (Postfix) with ESMTP id F0BE918DD; Fri, 7 Jun 2013 22:44:54 +0000 (UTC) Received: from alph.d.allbsd.org (p2175-ipbf701funabasi.chiba.ocn.ne.jp [122.25.209.175]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r57Mibij066053 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Jun 2013 07:44:47 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r57MiZmp016280; Sat, 8 Jun 2013 07:44:36 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sat, 08 Jun 2013 07:43:55 +0900 (JST) Message-Id: <20130608.074355.1943574601566819598.hrs@allbsd.org> To: trhodes@FreeBSD.org Subject: Re: svn commit: r41848 - head/en_US.ISO8859-1/htdocs/layout/js From: Hiroki Sato In-Reply-To: <20130607113436.4dc1cbc3.trhodes@FreeBSD.org> References: <20130607.092534.356568932887378565.hrs@allbsd.org> <20130607113436.4dc1cbc3.trhodes@FreeBSD.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sat_Jun__8_07_43_55_2013_886)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sat, 08 Jun 2013 07:44:47 +0900 (JST) X-Spam-Status: No, score=-94.3 required=13.0 tests=CONTENT_TYPE_PRESENT, ONLY1HOPDIRECT,QENCPTR1,RCVD_IN_PBL,SAMEHELOBY2HOP,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: wblock@wonkity.com, svn-doc-head@FreeBSD.org, gjb@FreeBSD.org, svn-doc-all@FreeBSD.org, doc-committers@FreeBSD.org X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2013 22:44:56 -0000 ----Security_Multipart(Sat_Jun__8_07_43_55_2013_886)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Tom Rhodes wrote in <20130607113436.4dc1cbc3.trhodes@FreeBSD.org>: tr> On Fri, 07 Jun 2013 09:25:34 +0900 (JST) tr> Hiroki Sato wrote: tr> tr> > Eitan Adler wrote tr> > in : tr> > tr> > ea> On 6 June 2013 16:28, Hiroki Sato 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)----