In my previous post, Url Shorteners: Destroying the Web Since 2002, I mentioned that one of the "features" of the new generation of URL shortening services is to frame the target content.
You could open a new window with the content and redirect the framed page to about:blank. Mind you, it’s user-hostile to bust a friendly frame like Digg’s; I would be inclined to allow users read-only access to the page if it thinks it’s being framed. And give them a big BUST button if they want to upvote or comment or change their preferences.
(Heh, you could make the page read-only by superimposing an invisible frame.)
as you say, you cannot reliantly to bust out of a “malign” frame. But you can detect this condition and notify (or annoy) the user, right? For example:
if (top.location != document.href) { alert(“stop framing me!”); }
Sort of final effort nuking if the frame busting didn’t work…
To rid the frame busting busting JS, couldn’t you just over ride the window.onbeforeunload function with an empty function? Then the counter would never get incremented and you could leave the page.
Not sure what happened there, but the first time I submitted my comment I got:
Your comment submission failed for the following reasons:
Publish failed: Renaming tempfile ‘C:\codinghorror\blog\archives\001277.html.new’ failed: Renaming ‘C:\codinghorror\blog\archives\001277.html.new’ to ‘C:\codinghorror\blog\archives\001277.html’ failed: Permission denied
But it seems the comment actually got there. Caching problems?
in this case even if the overriding was overridden you could still detect it and try to get the user to go to the original content. Of course, all of this is dependent on the client browser having javascript enabled. If not then the frame stays no matter what you do.
I find it quite amusing that IE is singled out (and to be fair, they have that really dumb directive) when framebusting is NEVER reliable in ANY browser.
In Winforms, if you set opacity to zero, the form effectively isn’t there anymore and clicks go through to what ever is beneath - this could be something that browsers could look at doing… though setting to ‘nearly’ invisible would probably break that.
Except that according to Google the link=canonical can’t be used to suggest a page on a different domain, and will be ignored.
Can rel=“canonical” be used to suggest a canonical url on a completely different domain?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. So site owners can specify a canonical page on www.example.com from a set of pages on example.com or help.example.com, but not on example-widgets.com.