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.


 
4 Comments posted on "How to kill that Digg Bar Frame"

[...] 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 #

Really useful!


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

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 #

Useful post… thanks


Post a comment
   Name Required
   Email Required
   URL