Framebar and the problem

Few months back, Digg introduced a product called DiggBar and there was a lot of hungama (buzz) around the world wild web. If you wonder what’s a framebar, then let me describe that in some simple words. Framebar is a webpage with a toolbar looking area at the top and a iframe in which a website is displayed. If you understand what DiggBar is then that’s a perfect example of framebar. Other major examples of framebars are: Google Search Cached Page, Google Image Search result, Google Translate, StumbleUpon framebar, AddThis framebar etc. While doing some reasearch regarding these framebars, I found that facebook was using its framebar sometimes back. Well I am not going to talk about sharing search engine juice with these framebars, I am going to talk about how these framebars create navigational problem sometimes.

You found a link, that’s a DiggBar link. You clicked on that link and read the actual content, which was displayed in a iframe/frame. You read that post and then you found another link in that page, which made you interested and you clicked on that link. Every thing was going find and you were navigating through pages. Suddenly you found that you are reading the page which is inside a frame or you want to copy the link to post that somewhere or send to a friend on IM. When you saw it’s inside a frame you started thinking how to get the URL of the page. If you are an advanced user, then you must know many ways to find the url of the frame. But if are not that, then it might create a real problem. If you love to google, then you might want to search for the ways to get the url of the page. But here is a bad news. You might not get what you search for, however it totally depends what the search term you use. For testing purpose I searched for ‘how to get the url of the page inside a frame’, but I did not find a single page which gives this answer. The case might be like this. You might not recognize the frame (or you are absent minded), and you might copy the url displaying at the address bar. But when you share this, you share the wrong address.

You might be thinking yourself lucky (or smart) when you saw a close button at the top of the page (normally at the right of the framebar). But when you click on that, the framebar goes out and the initial page, with which you started initially displayed in the browser (of course, without any frame or framebar). You said “What the Fcuk?” and might click back button to continue navigating through pages (and forgot to share the page).

Today (updated on 8th Oct., 2009) I got a comic strip by Brad Colbow which explains the same problem in a better and funny way. Here is the strip:

the_bradz_diggbar

When I browse pages inside any framebar, sometimes I feel uneasy inside a framebar and want to go out. But without thinking much I click on the close button of the framebar which throw me at the page with which I started initially. Sometimes that create frustration. Anyways, I don’t worry about getting the url of any framed page to share ๐Ÿ˜› . There are several methods to get the url of current framed page, but I prefer to make a middle click on the link which I want to see. But one incident inspired me to have this post, else I was posting how I cook tasty mutton curry, now ๐Ÿ™‚ . Well the problem is: When I click on a AddThis link to share something on Facebook, it showed me a page with a framebar. As per the code done by the developer to display the share links on the page, it might open a popup or open in a new window or tab. The page for add to Facebook should open in a popup window, so when you cancel, it should close the popup. But when AddThis opened it in a new tab with a framebar, when I press cancel nothing happens. I could close the tab, but I am interested to know why it’s not doing anything. But I found several links to Facebook there. I clicked one of them and after landing on another page, I want to remove the framebar. But when I click on close button, it sent me to initial sharing page (This time there was no framebar). Again, when I click on the cancel button, it send me back to the back page in the history. I am going to tell how to improve the close button for these framebars, but the cancel button there in the Facebook sharing page need to be improved. In my opinion, it should close the window (tab) if there is no history. Facebook developers must have assumed that the sharing page will open in the same tab, but in real world, site developers will like to open these links on a new tab or people like me like to middle click on those links to open in a new tab.

Few framebars (like AddThis) use simple anchor link to the initial framed page on the close button and few use JavaScript (like DiggBar). Using JavaScript, they can easily get the url of the iframe and show the current framed page without the framebar, instead showing the first framed page without the framebar. I expressed what I think on this and wonder why such good developers did not think about this. Now I need to watch who is going to implement this or what’s problem with my suggestion. I believe great thinking creates a great application. What problems do you face due to these framebars? Please comment.

Update (9th Oct., 2009) Important one

Today I noticed that Creative Commons Search has a framebar. Here the framebar is an essential tool. And they have implemented javascript code to show a page out of the frame when the user clicks on the close button. Unfortunately, that code does not work in any popular browser. In Firefox 3.5, Opera 10 and IE 8, it shows javascript error and does not work. In Chrome 3 and Safari 3.1.1 it redirect to a page http://search.creativecommons.org/undefined which is not a valid page.

The error in Firefox is like this:

Error: Permission denied for <http://search.creativecommons.org> to get property Location.href from <http://www.flickr.com>.
Source File: http://search.creativecommons.org/search.js
Line: 453

If you look into the code, you will find,

function breakOut() {
	if (url.length > 10) window.location = window.results.location.href;
}

As the url of the iframe is not local (not in the same domain as the main domain, here search.creativecommons.org), it throws permission error. This is a safety measure to avoid XSS attacks. So what I was thinking did not work here. But I believe one day someone with come with a great solution.

Image credit: Fickr – Rennett StoweWatching Life Go By


Posted

in

by

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.