Do Not Track
Posted by: vincent
Date: June 05, 2012 08:27PM

Hi. I'm currently using 1.5.4. Is there a way to get Kmeleon to add the DNT header to every request?

Thanks a lot

Re: Do Not Track
Posted by: JamesD
Date: June 06, 2012 12:08AM

I am not sure. I am going to ask a technical question here in hope that someone knows the answer.

If we could add a carriage return (CR) and line feed (LF) character sequence plus the string 'DNT: 1' to the user agent field would K-Meleon then pass the entire string as two headers?

Headers are just strings in the form item name (colon) item value ended by a carriage return (CR) and line feed (LF) character sequence. If we were to add the extra (CR) (LF) and DNT: 1, it should appear that we have sent two headers.

Edit: I cannot get a (CR) (LF) to be a part of a pref. The user agent string is a pref.

Anybody have another idea?



Edited 1 time(s). Last edit at 06/06/2012 03:16AM by JamesD.

Re: Do Not Track
Posted by: rodocop
Date: June 08, 2012 08:35PM

There is a preference in FF:
privacy.donottrackheader.enabled;true

People say that it works in FF 3.6.x, so I guess you can upgrade to KM-1.7a2 and create such preference in about:config.

Then you can visit http://analyze.privacy.net to check whether DNT header is being send.


Try K-Meleon-1.6db+NS by dugbug // KM-16-S2014 by Fred // 1.6beta2.6 by JamesD

K-Meleon Twin+ Download for modern browsers =//= Download for old ones =//= Discuss it!!!

New KM74 for test and feedback! Get it there!



Edited 1 time(s). Last edit at 06/08/2012 08:36PM by rodocop.

Re: Do Not Track
Posted by: JamesD
Date: June 09, 2012 06:44AM

The KM 1.6.0 beta 2.4 version has do not track. However the pref that rodocop mentioned does not work to control it. KM 1.6 has an earlier engine than KM 1.7.

Deadlock provided me the information about a file called donottrack.js that is in the components directory. This file appeared in the engine upgrade in beta 2.4. It does not seem to be in the original beta 2 version.

Since the pref does not work in beta 2.4, I am working on a different method of controlling this function. More to come later.

Re: Do Not Track
Posted by: Marcus
Date: June 09, 2012 03:42PM

I have DNT over year in K-Meleon 1.5.4

Simply copy:

/*
donottrack.js
Jonathan Mayer - jmayer@stanford.edu

An XPCOM component that adds a Do Not Track header to all web requests.

v0.02 - 1/30/11
Updated header.

v0.01 - 10/26/10

Acknowledgement: Closely follows Mozilla's example XPCOM HTTP header modification component, https://developer.mozilla.org/en/Setting_HTTP_request_headers.
*/

var DoNotTrackHeaderName = "DNT";
var DoNotTrackHeaderValue = "1";

function DNTHTTPListener() { }

DNTHTTPListener.prototype =
{
observe: function(subject, topic, data)
{
if (topic == "http-on-modify-request")
{
var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel);
httpChannel.setRequestHeader(DoNotTrackHeaderName, DoNotTrackHeaderValue, false);
return;
}

else if (topic == "app-startup" || topic == "profile-after-change")
{
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(this, "http-on-modify-request", false);
return;
}
},

QueryInterface: function (iid)
{
if (iid.equals(Components.interfaces.nsIObserver) || iid.equals(Components.interfaces.nsISupports))
return this;
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
},
};

var myModule =
{
registerSelf: function (componentManager, fileSpec, location, type)
{
var componentManagerI = componentManager.QueryInterface(Components.interfaces.nsIComponentRegistrar);
componentManagerI.registerFactoryLocation(this.myCID, this.myName, this.myProgID, fileSpec, location, type);
var categoryManager = Components.classes["@mozilla.org/categorymanager;1"].getService(Components.interfaces.nsICategoryManager);
categoryManager.addCategoryEntry("app-startup", this.myName, this.myProgID, true, true);
},

getClassObject: function (compMgr, cid, iid)
{
return this.myFactory;
},

myCID: Components.ID("{b835ff9f-3fdd-47be-b216-d1e8c09252f5}"),

myProgID: "@donottrack.us/DNTHTTPListener;1",

myName: "Do Not Track HTTP Listener",

myFactory:
{
QueryInterface: function (aIID)
{
if (!aIID.equals(Components.interfaces.nsISupports) && !aIID.equals(Components.interfaces.nsIFactory))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
},
createInstance: function (outer, iid)
{
return new DNTHTTPListener();
}
},

canUnload: function(compMgr)
{
return true;
}
};

function NSGetModule(compMgr, fileSpec)
{
return myModule;
}

save as donottrack.js and put in K-meleon\components directory
restart
it's all

Marcus

Re: Do Not Track
Posted by: JamesD
Date: June 09, 2012 07:41PM

@ Marcus

Have you checked to see if that worked in 1.5.4. It does not work for me. Look at this site: http://browserspy.dk/donottrack.php

Re: Do Not Track
Posted by: Marcus
Date: June 11, 2012 08:17AM

it work!

HTTP_DNT 1
HTTP_HOST browserspy.dk
HTTP_REFERER http://browserspy.dk/donottrack.php
HTTP_USER_AGENT Mozilla/5.0 (Windows; U; Windows NT 6.0; pl-PL; rv:1.8.1.24) Gecko/20100228 K-Meleon/1.5.4

Marcus

Re: Do Not Track
Posted by: vincent
Date: June 25, 2012 09:39AM

Markus, where should I place this javascript file?

Thanks

Re: Do Not Track
Posted by: vincent
Date: June 25, 2012 09:41AM

Nevermind grinning smiley

Re: Do Not Track
Posted by: vincent
Date: June 25, 2012 09:46AM

Marcus, your script doesn't work for me. Don't you have to modify something else in Kmeleon to get it to execute the script?

Thanks

Re: Do Not Track
Posted by: Marcus
Date: June 25, 2012 07:46PM

Quote
vincent
Markus, where should I place this javascript file?

Thanks

in K-meleon\components\

delete files: compreg.dat and xpti.dat

restart k-meleon (1.5.4)

Re: Do Not Track
Posted by: vincent
Date: June 25, 2012 10:25PM

beautiful, thank you so much Marcus

Re: Do Not Track
Posted by: JohnHell
Date: June 26, 2012 04:54AM

Using K-meleon 1.6b2.4

Another test

http://www.browserleaks.com/donottrack

(say enabled)

Partially works or... whatever:

http://donottrack.us/

The above reported:

Your browser does not support Do Not Track
You have enabled Do Not Track


EDIT: what I get mixing results is that the browser doesn't support the DNT feature via DOM check but is sending it.

What does it implies? If the web server is checking headers before show the page (server side then, as PHP, for example), all is OK with K-meleon; if the page is checking capabilities of the browser via DOM (javascript), it is not detected as supported so they will track. (Note the difference between them: web server against page, server side against client side)



Edited 3 time(s). Last edit at 06/26/2012 05:05AM by JohnHell.

Re: Do Not Track
Posted by: G and marketing trick
Date: June 26, 2012 05:20PM

Some scenario,

Browser sending DNT-header and server still track, anyway. User have no idea track they or not.

Re: Do Not Track
Posted by: JohnHell
Date: June 26, 2012 10:58PM

Quote
G and marketing trick
Some scenario,

Browser sending DNT-header and server still track, anyway. User have no idea track they or not.

Of course, that's for sure.

It is as cookies. They can be used to track, but not indispensable. The best example are the forums. You can access a forum without a cookie. The forum creates a session ID for the current client/user and all done.

Re: Do Not Track
Posted by: km2
Date: June 27, 2012 01:52AM

@ JohnHell

Thanks for the reply..

K-Meleon forum is powered by Phorum.