17 ms·
well yeah, but why would they want to block out the "orange website"?
by only4here 5y ago
well yeah, but why would they want to block out the "orange website"?
- bryanlarsen 5y agoI don't think "screw with" means "block" in this case. But there is one moderately famous blog that does block HN: https://www.jwz.org/ https://www.jwz.org/
- wanderingjew 5y agoyeah I asked jwz how to do that, but I can't figure out a way to make that work with Github pages.
- shakna 5y agoHN helpfully uses the referrer, so you can easily do it with a tiny bit of JS: <script> if(document.referrer == "https://news.ycombinator.com/") { // Mess with HN users here... } </script>
- vidarh 5y agoView source on the linked website just now: <!-- DO HN STUFF HERE <script> if(document.referrer == "https://news.ycombinator.com/") { window.location = 'https://bbenchoff.github.io/images/Brogrammers.png' } </script> -->
- Beltalowda 5y agoif (document.referrer === 'https://news.ycombinator.com/') window.location = 'https://cdn.jwz.org/images/2016/hn.png' Or something along those lines should work.
- bryanlarsen 5y agoJWZ appears to use Apache, so he probably does something like http://www.htaccess-guide.com/deny-visitors-by-referrer/ http://www.htaccess-guide.com/deny-visitors-by-referrer/
- numpad0 5y agoThat is the way it was done back in the day, usually when admin wanted guests to not come through Google Search or to come through a correct word-of-mouth bouncer page. Client side JS implementations allow content to be viewed by blocking JS.
- demindiro 5y agoHe checks the Referer header[1]. In Firefox you can prevent that header from being sent by setting `network.http.sendRefererHeader` to 0 (in about:config). [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Re...
- Aissen 5y agoThey're not blocking it out, they are protesting the weird, variable, "original title" policy. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html