Comment by debugnik

20 days ago

This site redirects to HN when it notices HN in the referrer.

The fact sites do evil things with these headers is why I configure Firefox with

  network.http.referer.XOriginTrimmingPolicy

set to 2. It "breaks" sites, but often in good ways (such as the site in TFA).

  • Referrer links are a dumb idea. Why the hell do you want to know where I'm coming from other than to track me

    • For targeting advertising expendatures at the site level. If most of my traffic, as revealed by referrer links, comes from social-media-platform-foo and only a little from social-media-platform-bar, then I am likely to spend more on ads from foo than from bar. I'll grant that it is a noisy measure, but doesn't need to be about tracking a particular individual.

      1 reply →

Wow, I didn't even notice because I have extensions that strip the referrer header. Excellent.

If you have JavaScript enabled, that is. JWZ at least does the redirect on the server side.

The following is pulled in from `https://soc.me/assets/js/turnBack.js`:

    const undesirables = [
      "news.ycombinator.com/",
      // "reddit.com/", // disable temporaily
      "lobste.rs/"
    ] ;

    if (undesirables.find(site => document.referrer.includes(site))) {
      window.location.replace(document.referrer);
    }

I wonder why Reddit is "temporarily not undesirable".

This is an interesting way to prevent the hug of death. I wonder what the author's reasoning is, also would it really be effective?

  • I doubt it, the redirect is client-side, I got a flash of the page before the redirect.

    • If anything, it's going to at least double its traffic this way when people click again assuming they hit back somehow.