News for hackers. Stuff that matters.
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