5 ms·
How to block the DiggBar
- deleted 18y ago[deleted]
- mikeyur 18y agoLove it: http://digg.com/d1oNOZ http://digg.com/d1oNOZ For some reason I like this method better than frame-busting. To make it useful you could add a link to your homepage on there.
- dablya 18y agoThere is a direct link to the page in the digg bar itself and when clicked, the "fuck you" message remains (the digg bar disapears). Does the referrer change depending on which frame the request comes from?
- throw_away 18y agothe link is in the context of the digg domain, so if you click it, even though the bar is no longer present, the referrer (or should I say referer) will still be digg.com. interestingly, if you ctrl-r, the same HTTP_REFERER header will be sent. but ctrl-l, cr will blank the header & you'll get the regularly scheduled content.
- deleted 18y ago[deleted]
- tomsaffell 18y agoI see his point, but I'm not sure that "go fuck yourself" is the most effective way of making it. http://digg.com/d1oNOZ http://digg.com/d1oNOZ
- erlanger 18y agoIt is a daring way of making it.
- sho 18y agoI don't know, "go fuck yourself" sounds pretty unambiguous to me. What is there to explain? Digg knows exactly what they're doing, and that's exactly the reaction they deserve, IMO.
- erlanger 18y agoThere is something to be said for manners though.
- tptacek 18y agoDoesn't Facebook do pretty much the exact same thing?
- timdorr 18y agoAs does HootSuite: http://hootsuite.com/ http://hootsuite.com/ Personally, I don't get why Gruber is so upset. There is an option to always hide the DiggBar. Hover over the X on the right and click the down arrow. Then there's a link that sets a cookie so you never see it again. To me, he just sounds like a grumpy old man. The thing is useful, simple, and non-intrusive if you don't want to see it. No need to get profane about it...
- erlanger 18y agoIt goes against the grain of the web, that's why. Sites that connect so many users to so much content should not do that.
- dave_au 18y agoHe's not worried about it on the client side. He's worried about it from the server side. As was really, really clear from reading the article. Might shed some light on the downmods.
- sho 18y agoAlthough your comment is all kinds of wrong, it's the bit about being "profane" which really gets my goat. I mean, seriously. It is 2009. We are all adults. Are you honestly telling me you are offended, even in the slightest, by hearing the word "fuck"? If so - you got problems. Swear words are part of the language. Whether one uses them or not depends on the circumstance - inopportune or over-use gets you marked down as lacking class or civility, warranted use is justified and commendable. This is the latter IMO. I personally applaud Gruber telling Digg to "go fuck yourself". That's exactly what I thought, too, and they deserve nothing better. By trying to label and dismiss his justifiable reaction as "profane", though, you sound not only self-righteous, but as if you are attempting to discredit his argument using moral labels - like someone who is "profane" doesn't merit hearing out. Well, if that's what you think, you can go fuck yourself, too.
- erlanger 18y agoAssuming he uses Apache, why not just use a RewriteCond for that referrer and redirect to such a page? Executing that regex on every page is a performance hit, and generally I prefer to use Apache for stuff like this. If you do use the supplied PHP code on your website, I recommend using strpos() or strstr() instead of preg_match().
- tjogin 18y agoMaybe he knows what kind of performance margins he has.
- erlanger 18y agoWhat do you mean by that? At the very least, most PHP devs know that strpos/strstr are much, much faster than a regular expression.
- cakeface 18y agoUnless page load times are affecting your browsing experience, why bother optimizing when a regular expression is so clear and simple.
- erlanger 18y agoYou know what, you're right. I was thinking of something like: if (strpos('http://digg.com/', $_SERVER['HTTP_REFERER'])) header('Location: whateverPage'); But that would block all traffic from Digg, including links in comments, etc. To perform the same check as the regex would require much more code. However, I stand by my Apache recommendation as the best option.
- sho 18y agoerlanger, put a newline somewhere in your code! It's breaking the page.
- TwoBit 18y agoOr you can just use the DiggBar disable feature that it provides.
- dablya 18y ago"No, wait...." moment in 3..2..1
- reconbot 18y agoI'll explain, The problem is you seeing the links its that google will index the digg links to your site, people will pass around the digg links to your site. You'll see the digg link for every link you click on too.
- calvin 18y agoDigg did a blog post yesterday explaining all the steps they took to give the page juice to the content and not to their URL, so it shouldn't hurt the content-site's SEO (using rel=canonical, et cetera). http://blog.digg.com/?p=636 http://blog.digg.com/?p=636
- fuzzmeister 18y agoWhile I concede that the majority of Digg users are either unintelligent or insane, there are still a good portion of relatively reasonable people like myself who enjoy the service. Personally, I don't believe I'm the type of reader Gruber should be telling to "fuck himself", but that's exactly what he's doing. A far more reasonable approach would be to simply redirect to an unframed version of the page. Otherwise, why not just display this lovely page to any traffic with "digg.com" as the referrer?
- ojbyrne 18y agoSuddenly, without warning, digg has transformed themselves into IE6. The vast unwashed majority that you really don't want to have to deal with, but are forced to.
- andreyf 18y agoA far more reasonable approach... Albeit, not nearly as funny :) I suppose I should be growing out of that kind of humor, thought...
- mechanical_fish 18y agoI don't believe I'm the type of reader Gruber should be telling to "fuck himself" Then tell Digg to disable their stupid bar. Tell them again and again. That's obviously the idea. The difference between the Diggbar and IE6 is that Digg can solve the problem whenever they want. They can even selectively solve the problem for certain sites, though such behavior would not be very nice.
- miles 18y ago<script language="JavaScript" type="text/javascript"> <!-- function breakout_of_frame() { if (top.location != location) { top.location.href = document.location.href ; } } --> </script> ... <body onload="breakout_of_frame()"> ==================== The above is from: http://www.thesitewizard.com/archive/framebreak.shtml http://www.thesitewizard.com/archive/framebreak.shtml Another, shorter example: http://www.irt.org/script/473.htm http://www.irt.org/script/473.htm Actually, now that I've RTFA, it looks like the one DF linked to originally is swell, and doesn't require using onload: http://en.wikipedia.org/wiki/Framekiller http://en.wikipedia.org/wiki/Framekiller
- bonaldi 18y agoIt's a pity that Digg also made a grab for the URLs at the same time as they did the framing. Framing, despite all its 1996 squick factor, can be very handy: I've often wished HN had a bar similar to Reddit's, and the Google Images frame is good, too. I don't think Gruber goes nearly far enough in explaining his objections, however: he barely bothers beyond an "of course" and appeal to consensus. He does mention that URLs are important, and assumes that people will agree. But if you don't automatically agree, that's not going to carry the argument: after all, the full URL is in the DiggBar, and can be C&Pd by anyone savvy enough to care. Of course, the real problem is with unsavvy users who are going to start passing around URLs that flow via Digg, a blatant landgrab on their part, but he doesn't really explain this. By talking in passing about fights that we had in 1996 he's talking about ancient history to Digg's audience, and they're simply going to assume he's a cantankerous old grump, rather than realising why Digg's actions should be condemned. The "fuck you" page doesn't help this cause either: he could have used it to explain why the seemingly-useful bar's actually a bad idea. Instead, he's just going to piss off the hordes. A wasted opportunity, I think.
- windsurfer 18y agoI think I prefer the web 1.0 way of "manage it yourself" (tabs) as oppose to the web 2.0 way of "we'll do everything we think you want" (the digg bar).
- GHFigs 18y agoYou appear to have mistaken the author for someone who cares about Digg's audience. Gruber doesn't care about Digg's audience ("mindless, borderline illiterates"), and he has little incentive to educate them on why Digg's new shit salad has so much shit in it.
- bonaldi 18y agoI understood that, but he's got an audience that he presumably does care about, and he could have both snarked at Diggers and educated the people who don't understand the fuss at the same time. (Also, if he actually wants Digg to stop this, the best possible way is to point out to Diggers why the salad they're getting is full of shit so they can have one of their classic revolts)
- Fuca 18y agoI want to bookmark those pages as their are, not as digg pages. I do not know but I think this is going to backfire on Digg in the long run.