Opened 9 years ago

Closed 9 years ago

#25325 closed New feature (wontfix)

Support DoNotTrack (DNT)

Reported by: Paweł Krawczyk Owned by: nobody
Component: HTTP handling Version: 1.8
Severity: Normal Keywords: tracking, dnt, donottrack, privacy
Cc: Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

DoNotTrack (DNT) is a HTTP request header, a proposed W3C standard http://www.w3.org/TR/tracking-dnt/#dnt-header-field which is used by the browsers to communicate user's preference on server-side profiling or tacking. There is a number of 3rd party Django middlewares that add support of this header, but it would be nice if it was supported natively.

The implementation is very simple: just expose a dnt variable in the request object, depending on the value of DNT header in HTTP request. It takes 3 values: 1 if DNT header was 1 (explicit preference not to be tracked), 0 if DNT was 0 (explicit preference to be tracked) or None if there was no DNT header (no preference).

Sample middleware that does it is here: https://github.com/kravietz/django-security/blob/master/security/middleware.py#L67

Change History (2)

comment:1 by Tim Graham, 9 years ago

Has patch: unset
Triage Stage: UnreviewedSomeday/Maybe

Thanks for the suggestion. I've raised the idea on the django-developers mailling list for discussion.

comment:2 by Tim Graham, 9 years ago

Resolution: wontfix
Status: newclosed

Consensus from the mailing list:

Alex: "I would say no: this does _so_ little, and it's completely implementable outside of Django. Moreover, adding the middleware doesn't change any behavior, you still have to do a bunch of work in your app to actually implement the not-tracking logic."

Aymeric: "Indeed I’m afraid that people will believe that the middleware makes them compliant, while it doesn’t. Worse, it will echo the DNT header, implying that it’s handled correctly, even if it isn’t. "

Note: See TracTickets for help on using tickets.
Back to Top