News for hackers. Stuff that matters.
Re:Ask HN: Do you respect DNT in your personal websites? How? by mikekchar on Sunday June 11, 2017 @12:12PM (#14532497)
This is a bit of a lame answer, but generally I put any potentially tracking content in javascript. I make sure my blog renders correctly without javascript. Finally, I put a warning saying that if the user does not wish to be tracked, then they should disable javascript for the site.

I can't really see any other obvious way to deal with it, unfortunately.

Re:Ask HN: Do you respect DNT in your personal websites? How? by hellcow on Sunday June 11, 2017 @12:52PM (#14532677)
You could also put `if (navigator.doNotTrack === "1") { return }` at the top of your script.

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/d...

Re:Ask HN: Do you respect DNT in your personal websites? How? by amenod on Sunday June 11, 2017 @02:22PM (#14533055)
If you do that, you might want to add a message saying that you disabled all JS functionality on the site because of DNT, because it is not something users would expect to happen. If I set DNT and go to youtube.com, I would expect to see video anyway. The same for embedded videos on some blog.

I am not saying this is a bad way (it is much better than many others), just that users should be made aware of the cause.

Re:Ask HN: Do you respect DNT in your personal websites? How? by bArray on Sunday June 11, 2017 @09:52PM (#14534809)
Thank you for this, I implemented a respectful DoNoTrack inspired by this comment:

http://coffeespace.org.uk/dnt.js

http://coffeespace.org.uk/projects/do-not-track.html

Re:Ask HN: Do you respect DNT in your personal websites? How? by r3bl on Sunday June 11, 2017 @01:09PM (#14532739)
So, please, correct me if I'm wrong, but from what I understood:

1. You don't respect DNT by default for a majority of users (since a user explicitly needs to disable JS).

2. You provide a relatively easy option for your viewers to disable tracking and make sure that everything works without third party tracking.

If I got it right, what you're doing is definitely not respecting DNT by default, but still doing more than most of the Web in order to reduce tracking (especially if you're donating screen estate in order to point that out).

Re:Ask HN: Do you respect DNT in your personal websites? How? by mpolichette on Sunday June 11, 2017 @12:41PM (#14532629)
This is actually not a lame answer at all. It's a plausible approach for your users who are worried about privacy to still use your site.
Re:Ask HN: Do you respect DNT in your personal websites? How? by Ferofluid on Tuesday June 13, 2017 @03:45AM (#14543405)
Make a checkbox and persist it with a cookie, the only use of the cookie would be a binary on/off choice. At the beginning of your script you look at the checkbox's state. If it's off you return out of the sript early, otherwise you run your usual tracking code.

Thus your users wouldn't have to fiddle with disabling javascript just for you(if they even know how to)