Member Sign In
Not a member?

A Wired.com user account lets you create, edit and comment on Webmonkey articles. You will also be able to contribute to the Wired How-To Wiki and comment on news stories at Wired.com.


It's fast and free.

Sign in with OpenID
Sign In
Webmonkey is a property of Wired Digital.
processing...
Join Webmonkey

Please send me occasional e-mail updates about new features and special offers from Wired/Webmonkey.
Yes No

Please send occasional e-mail offers from Wired/Webmonkey affiliated web sites and publications, and carefully selected companies.
Yes No

I understand and agree that registration on or use of this site constitutes agreement to Webmonkey's User Agreement and Privacy Policy.
Webmonkey is a property of Wired Digital.
processing...

Retrieve Sign In

Please enter your e-mail address or username below. Your username and password will be sent to the e-mail address you provided us.

or
Webmonkey is a property of Wired Digital.
processing...

Welcome to Webmonkey

A private profile page has been created for you.
As a member of Webmonkey, you can now:
  • edit articles
  • add to the code library
  • design and write a tutorial
  • comment on any Webmonkey article
Close
Webmonkey is a property of Wired Digital.

Sign In Information Sent

An e-mail has been sent to the e-mail address registered in this account.
If you cannot find it in your in-box, please check your bulk or junk folders.
Sign In
Webmonkey is a property of Wired Digital.

The Diggbar Is Evil, Here’s How to Stop it

When Digg rolled out its new Diggbar feature ��� a toolbar that displays the content of a site inside a browser frameset ��� not everyone was pleased. Many of the web’s old hands cried foul, claiming the toolbar merely framed other websites.

The practice of presenting another site’s content within a frame served from your website has long been hated by web purists, and with good reason: It’s evil.

When the Diggbar first launched, Daring Fireball publisher John Gruber wrote, “When you call it ‘framing someone else’s site,’ everyone agrees it’s bullshit…. When you call it ‘The Diggbar,’ it’s Web 3.5 Awesome.”

Here’s the problem: If your site ends up on Digg, visitors using the Diggbar will visit your URL ��� just the shortened Digg URL. If they bookmark the page, they’ll be forever visiting Digg, not your site. To make matters worse, Digg is serving ads through the Diggbar, which means your content is being framed and layered with ads. Meanwhile, Digg walks away with the money. Three Dog Media has a detailed explanation.

Digg is effectively making any links from the Diggbar useless to anyone besides Digg, and the results are evil of the highest order: It steals traffic, obfuscates URLs, pockets a profit and breaks the most basic element of the web: the URL.

For his part, Gruber quickly put together a bit of code to short-circuit the Diggbar. The result is a three-line snippet of PHP that checks to see if the referring URL is from the Diggbar. If it is, Daring Fireball displays its own private message for Digg readers.

UPDATE: Engadget is blocking it, too.

Not using PHP on your site? Not to worry, the basic principle is the same regardless of the language. You just need to inspect the referring URL, match it against a regular expression (see Gruber’s regex for a starting point) and then decide what to do: Output a message, redirect to a goatse image … the sky’s the limit.

Of course you could always use a JavaScript frame-busting tool that stops your page from loading in any frame, but that might be overkill. The server-side method has the advantage of only targeting the sites you really want to stop.

Post Comment Comments Permalink Print
Reddit Digg

 
Subscribe now

Special Offer For Webmonkey Users

WIRED magazine:
The first word on how technology is changing our world.

Subscribe for just $10 a year