Hacker News new | ask | show | jobs
by joemi 1378 days ago
Did he disable it for this article? Because I got through without doing anything unusual.

But also: I don't really get why he'd want to do that. I read the article, and I get his complaints, but they don't really seem to have anything to do with other people reading his site. They sound like reasons for _him_ to not post to and engage on HN, not reasons to try to stop people coming from HN from reading his site. His site doesn't seem to have comments, so why does it matter who reads it? I really must be missing something.

3 comments

You must have a browser setting that blocks Referer headers or disables JavaScript by default.

Here is the snippet of code that does the redirect:

    <script>
    try {
        if (document.referrer) {
            const ref = new URL(document.referrer);
            if (ref.host === 'news.ycombinator.com') {
                window.location.href = 'https://google.com/';
            }
        }
    } catch (e) {}
    </script>
Maybe if you have SmartReferer, or for some reason your browser isn't sending it. I had to disable it to see it in action
Did you click through to it from news.ycombinator.com? Or some other site like hckrnews.com?