Kay lives here

working with the web

iStock_000015412601Smallwarning_256

Annoying blog trait: please stop trying to hijack the browser window

brokenwindows.jpg

When com­pil­ing my “week in Cold­Fu­sion” blog posts for Site­Point, I some­times come across JavaScript “frame-busting” scripts that drive me around the bend. Let me explain…

After a long time as a Feed­De­mon user, I switched to Google Reader. Much as I love FeedDemon’s smart inter­face, I found more and more that I needed all my browser-based toys (exten­sions, social book­mark­ing tools, etc) close by. Grab­bing links that I had flagged in Feed­De­mon to open in Fire­fox was slow­ing me down. I sub­scribe to over 200 feeds, so get­ting through them all quickly is important.

Google Reader is great, and with the Bet­ter GReader Fire­fox exten­sion it’s even bet­ter (haw haw). I’m par­tic­u­larly a fan of the Pre­view but­ton the exten­sion adds, which lets you open the full page inline in Google reader. It’s great when work­ing with par­tial feeds, like those deliv­ered by Ful­lasa­goog and MXNA — I can quickly check out the full post with­out leav­ing the com­fort of Google Reader.

But there’s one annoy­ing and rude “fea­ture” of some blogs that is caus­ing me grief — JavaScript which, on page load, checks if the site is being framed by another, and if so, busts it out into the full win­dow. This is annoy­ing because when I use the pre­view func­tion in Google Reader, sites with this script replace my cur­rent Google Reader win­dow with the full site in ques­tion and I lose my place in what I was doing.

I can under­stand why peo­ple don’t want their con­tent being framed by another site — but peo­ple, it’s 2008, you make the con­tent in your feeds freely avail­able and it gets repur­posed in so many ways it’s not funny. Try­ing to con­trol how a site is viewed is rude and pushy, as far as I’m con­cerned, and it’s mak­ing it hard for me to book­mark, Digg or oth­er­wise share the con­tent, which is to the site’s detri­ment. It goes against the open and flex­i­ble nature of the seman­tic web.

I do acknowl­edge this is par­tially a browser issue — my browser should stop rogue sites from mis­be­hav­ing in ways I don’t like. Unfor­tu­nately nei­ther Fire­fox 2 nor 3 offer this level of con­trol, the Pre­view Grease­mon­key script does not yet include this func­tion­al­ity (although it has been sug­gested) and using a JavaScript black­list exten­sion like YesS­cript on just offend­ing sites stops my book­marklet tools from work­ing on these sites as well, which really defeats the purpose.

So let’s all share the love and drop the 1999-style frame-busting scripts. How about it?

10 Comments

  1. Ooooo… I’ve just installed that Bet­ter GReader Fire­fox exten­sion and I’m lovin’ it.

    My solu­tion to sites that weren’t reader-friendly was nearly always to boy­cott them! There were a few essen­tials that I kept in a sep­a­rate book­mark list which I would man­u­ally visit every few weeks but oth­er­wise, I’d rather find another source. Which goes to show how impor­tant feeds are these days.

    So I sus­pect it’s too much to ask for Google to imple­ment this extension-hack offi­cially (from a legal stand­ing for a start)?

  2. Hey Dom, if you like Bet­ter GReader check out Bet­ter Gmail, Bet­ter Flickr and Bet­ter YouTube on the same site… they all rock. The sec­ond ver­sion of Gmail included a lot of the enhance­ments that were in the Bet­ter Gmail exten­sion for ver­sion 1 of Gmail… so I think Google are watch­ing and listening.

    I wish I could boy­cott the sites that mess with my browser, but I can’t afford to miss out on the valu­able con­tri­bu­tions they make… hence this post!

  3. I’m one of “those guys”, so let me chime in with my reasons.

    First off — I added the code to BlogCFC when I dis­cov­ered my site being ripped off by some­one else. This wasn’t some­one using my feed, but using my con­tent within their frames and earn­ing money off of it.

    You said: “you make the con­tent in your feeds freely avail­able and it gets repur­posed in so many ways it’s not funny” The frame bust­ing code is NOT in my feed con­tent at all. You can browse my feed and the entry data in the feed (I share both a ‘full’ feed with full arti­cles and a feed with abbre­vi­ated art­ciesl) with­out being “busted”. If you wish to view the entry on my blog, how­ever, the frame bust­ing code will run.

    I may be the ‘edge’ case here, but my blog actu­ally gen­er­ates sig­nif­i­cant income for me — so I tend to be a bit over­pro­tec­tive about it. ;) I’ll take a look at Google Reader. It may be worth­while to sniff for it and not bust it.

  4. Odd. I added my blog to Google Reader. All my links open in a new tab for me any­way –so the frame bust­ing doesn’t even really apply.

  5. Hi Ray,

    Your site was one of the sites I was talk­ing about, but not the only one. Inter­est­ingly, out of over 200 feeds, it’s only 2 — Ful­lasa­goog and MXNA — that con­tain blogs with frame-busting scripts. So from a wide cross sec­tion of the blo­gos­phere, it’s only CF peeps that do this.

    As I men­tioned in the post, I’m using the “Pre­view” Grease­mon­key script (part of the Bet­ter GReader Fire­fox exten­sion), not plain vanilla Google Reader, and I’m not sub­scribed directly to your feed, I read it in Ful­lasa­goog and MXNA where full con­tent is not pro­vided. I would have no hope of keep­ing up with all the CF feeds if I didn’t use aggregators.

    I think it’s a phi­los­o­phy issue. One of the core con­cepts of acces­si­bil­ity is that you don’t know how or where your con­tent will be accessed. My approach would be to deal with content-framing offend­ers indi­vid­u­ally rather than using a blan­ket approach that poten­tially incon­ve­niences everyone.

    How­ever, I acknowl­edge I can’t change the world so I will have to change myself… err, change my browser, myself — I’m work­ing on another Grease­mon­key script at the moment to block frame-busting JS :)

    Ray, your con­tri­bu­tions to the CF com­mu­nity are valu­able and I would be doing a dis­ser­vice to my Site­Point audi­ence if I didn’t include them in my “Week in CF” round-ups. I post because I care!

  6. I’ve removed the frame buster for now. It isn’t removed from BlogCFC code itself — I’ll have to think more on it, but for now, my blog is fram­able. Just don’t tell any­one. Shhhhhh.

  7. Sir, you are a Jedi and a Gentleman :)

  8. @Raymond — from some­one on lurk­ing side of the Cold­Fu­sion com­mu­nity. Thankyou.

  9. The other side of the site-owner mon­e­ti­za­tion issue is that it can impact your earn­ings directly. Some ad net­works flag those framed calls to your con­tent (and there­fore the ad calls) and may dis­pute them. Oth­ers may not serve the ads at all. I was actu­ally think­ing about re-adding a frame bust­ing script to my largest site. Why? Google Images is my biggest refer­rer each month, and they pull up your page in a frameset…

    But over­all, I totally agree with your sen­ti­ment on this one Kay. In the age of RSS, you really need to real­ize that your con­tent is being con­sumed in tons of dif­fer­ent ways. But I would never have guessed that such an on-site script would present a prob­lem with­out read­ing your com­plaint either. Even though the means to being incon­ve­nienced by it are fairly round-about (using a par­tial feed from an aggre­ga­tor and Fire­fox exten­sions to aug­ment an online ser­vice), the under­ly­ing points is good food for thought.

  10. Unfor­tu­nately this behav­ior is about to become a whole lot more com­mon. Due to click-jacking, it’s very pos­si­ble many sites will imple­ment frame-busting scripts in order to pre­vent this exploit…

    That is unless browser ven­dors find a way to fix it, and I hon­estly don’t see how it can be done with­out break­ing some of DHTML core.