<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>75008</bug_id>
          
          <creation_ts>2011-12-21 08:07:25 -0800</creation_ts>
          <short_desc>navigator.doNotTrack returns wrong values.</short_desc>
          <delta_ts>2011-12-21 16:00:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Justin Lebar">justin.lebar+bug</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>me</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>525268</commentid>
    <comment_count>0</comment_count>
    <who name="Justin Lebar">justin.lebar+bug</who>
    <bug_when>2011-12-21 08:07:25 -0800</bug_when>
    <thetext>We decided that navigator.doNotTrack would return &quot;yes/no/unspecified&quot; in Firefox, but Safari 5.1 apparently [1] returns &quot;1/0/(empty string)&quot; to match the DNT header.

The reason we did &quot;yes/no/unspecified&quot; is because we wanted no value to parse as &quot;false&quot; in JS.  This way, buggy code which does |if (navigator.doNotTack)| will fail closed.  With 1/0/(unspecified), the bogus boolean check works so long as you never have people explicitly opting in to DNT; thus we were afraid that sites would rely on DNT being a boolean, rather than a tri-state, and then we&apos;d never be able to send navigator.doNotTrack == &quot;0&quot;.

How would you feel about changing to match Firefox&apos;s implementation?

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=712616</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525346</commentid>
    <comment_count>1</comment_count>
    <who name="Justin Lebar">justin.lebar+bug</who>
    <bug_when>2011-12-21 11:00:20 -0800</bug_when>
    <thetext>&gt; With 1/0/(unspecified), the bogus boolean check works

Er, that should be &quot;With 1/0/(empty string)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525757</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-12-21 15:56:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/10616671&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525762</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-12-21 15:59:58 -0800</bug_when>
    <thetext>Perhaps confusingly, WebKit doesn&apos;t implement the doNotTrack property yet. Adding it is tracked by bug 73088.

In Safari, doNotTrack property is injected by closed source browser code. I have migrated your report to Apple&apos;s internal system, and will close this bug now as a non-WebKit issue. Thank you very much for letting us know!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>