Apr
04
Filed Under (Technology) by Thejesh GN on 04-04-2009

Digg recently introduced url shortener. This is not your standard url shortener where the shortener does a 302 forward. Digg shortener displays destination site in a frame. Which means the reader still stays on the Digg.

Most of the modern web analytics software will be able to record this visit, but it will problem in finding out the actual referrer.  Also standard traffic counters like alexa don’t count this visit against your site.
So if you don’t like to that DiggBar to be displayed on your blog.  You can add this one line code to your site. Add it to your webpage’s head section.

<script type="text/javascript">
if (top !== self) top.location.href = self.location.href;
</script>

This code in fact doesn’t allow anybody to display your content in their frame. Here is the demo url http://digg.com/u1BSW to check. It should work on all browsers.
Let me know if you have any other suggestions.



Comments:
7 Comments posted on "How to kill that Digg Bar Frame"
thej on April 4th, 2009 at 5:35 PM # Reply

My blog post – How to kill that Digg Bar on your site http://bitly.com/19ZRIs

This comment was originally posted on Twitter


thej on April 4th, 2009 at 5:44 PM # Reply

@xubz using settings, can you disable DiggBar for all the visitors of your site ? I guess no… http://bitly.com/19ZRIs does that..

This comment was originally posted on Twitter


restill on April 4th, 2009 at 11:50 PM # Reply

Loose the diggbar. – http://bit.ly/11dKxX

This comment was originally posted on Twitter


[...] a bit fed up with companies like Facebook and Digg hijacking your posts inside their marketing frames? Well take a look at No Frames, a handy little WordPress plugin which removes these frames so you [...]


Veera on April 12th, 2009 at 11:22 PM # Reply

Really useful!


chethan on April 14th, 2009 at 4:36 PM # Reply

hey! the idea is good and the script works well!
But, If You Have An Interesting Story And Ppl Need To Digg it..
Then There is no chance the user diggs ur story…

is there anyway that we could escape only the diggbar not the page?


Pradeep CD on April 14th, 2009 at 5:18 PM # Reply

Useful post… thanks


Post a comment
   Name Required
   Email Required
   URL