Keeping Digg Honest

— Topic: JavaScript

For those of you who know me, you also know that I have a love / hate relationship with Digg. They seem to love linking to my content, and I generally don’t care for the negativity their readership brings both via comments on my site and Digg itself. In the past, I was simply deflecting all Digg traffic.

However, friends convinced me the embargo really just hurt end-users, by not allowing them to get at the content they were seeking. Fair enough. Plus, it wasn’t really Digg’s fault that the majority of their readers act as they do.

Today though, via Mint I noticed something that most definitely does smack of suspicious activity. Namely, a clever form of content misappropriation. It’s basically an iframe that includes your site, with a DiggBar at the top.

DiggBar

At first glance, this does not seem like a big deal, but it creates a twofold problem. First, it allows Digg to cross link various unrelated sites, all the while keeping their bar (potential advertisements) in front of users – making a mini browser. Second and more importantly, it associates their brand with my site, and Digg is a brand I’d rather distance myself from, given the choice.

That’s the crux of my blog post. You, as a site owner and content creator, do have a choice. You can let Digg do whatever they want with your content, or you can add this simple bit of JavaScript to the head of your document.

Note: To see this in action, check out this would-be DiggBar link.

<script type="text/javascript">
/* <![CDATA[ */
if (window.location !== window.top.location) {
  window.top.location = window.location;
}
/* ]]> */
</script>

Last I checked, large respected news sites such as NYTimes.com use this method to keep scrapers from passing off NYT content as their own.

Basically, it asks the browser: Is this page being viewed in the uppermost window? If not, then you know it’s in an iframe in which case it redirects the entire browser to view the original page on your site, sans DiggBar.

The nice thing is – Not only does this work for Digg, but it also will free your writing from the clutches of any other content leeches as well. I must admit, part of me feels bad. Used on a wide scale, this will take “the wind out of the sails” for a company that is desperately trying to find a business model.

Update: Faruk Ates and John Gruber have also posted their respective solutions to dealing with the lame-ness of the DiggBar. Gruber’s is particularly brutal. Popular tech news site Engadget (of Weblogs, Inc) is blocking it as well.

Powered by Fusion Ads
 

JS Tutorial, JavaScript Tutorial, JavaScript Guide, Learn JavaScript JS, How To Learn JS, Learning JavaScript
Promote JavaScript


Disclaimer

The thoughts and opinions expressed here are mine alone, and are not necessarily shared by any other living person.