views:

54

answers:

2

Goal

I want to create a web app with a horizontal GUI bar that floats with the user as they move from site to site. e.g. A user will sign into the web at the home page and then proceed to say Google to start searching for their topic. Once they are signed in and leave the web app homepage a horizontal GUI bar will appear on each page they visit until they log out. So when a user goes to Google to start searching the GUI bar will be there. When they click on a link and go to that page, the GUI bar will be there too.

Known Ways

I noticed apps like Get Glue and Layers.com work by having the user install browser extensions. I would like to avoid this if possible.

Additionally it can not be like the Digg Bar because it only appears when a user presses the book marklet or places digg.com in front of the site/page URL. It also can't be like the Facebook or Meebo bars because it requires the web developer to already have implemented that code on their site.

Closest Example

The best example of what I am trying to go after is something like Google Image search where if you click an image Google will open up the site (but grayed out) with the picture hovering above it and a left side bar with image info in it. So Google opens a site with in it self. Another example might be Stumble Upon's top GUI bar.

Is my idea possible with technologies like AJAX and Python?

+1  A: 

Is my idea possible with technologies like AJAX and Python?

If the pages you want floating under the bar belong to a different domain than yours (it seems like that's what you want), then the answer is No. This is not possible with client-sided scripting alone (eg: Javascript) because of the same origin policy. What you use on the server side, Python or Ruby or whatever is irrelevant.

Aillyn
Well, the OP may be happy with the Google Image approach, but note that you're loading a Google-hosted page when you do that. In the old days, we'd use frames for that - without poking through Google's page source, I assume it's rewriting the DOM to build the desired visual appearance.
Michael Petrotta
Ah - I see we **still** use frames for that.
Michael Petrotta
@Michael Petrotta So the sites that Google Image Search is loading are hosted by Google? I thought that Google was just calling that site in via AJAX and then popping their own image info side bar and hovering image with it. If so how is this legal for Google to host another site's page?
J3M 7OR3
@J3M: Google is building and directing you to a dynamically-generated HTML page that contains something called a `frameset`. The right side of the frame has Google-specific functions. The left side has a **link** to the referenced site (**not** the entire contents of that site). Look up `<frame>` and `<frameset>` in the HTML documentation. Note that many people consider frame use hacky at best.
Michael Petrotta
Also note that some websites have objected to other sites, like Google, even *linking* to their content. There's been a court case or two; not sure how that's turned out. If you're interested, look up "deeplinking".
Michael Petrotta
@J3M Google doesn't load any sites in their Image search. Even those images are cached and hosted by Google.
Aillyn
@Aillyn: that's true on the main search page, but click on a single image. It appears that Google's loading up the entire site in a iframe. Been a while since I've done any serious web development, but...
Michael Petrotta
@Michael Petrotta I understand frames/frameset now but I still do not understand how it is legal for Google to load in another person's webpage under the google.com url. Or is it legal to load in other people's pages? @Aillyn doesn't says it's not legal and I also read that it is considered fraudulent here http://en.wikipedia.org/wiki/Framing_(World_Wide_Web)
J3M 7OR3
@Aillyn I understand that no sites are loaded in the initial Google Image search. I am referring to what happens when you click on an image and it brings you to the intermediary page where you have the Google Image right side bar w/ image info and a large iframe with the site loaded in behind a semi-transparent black sheet with the image floating above it w/ dropshadow.
J3M 7OR3
@J3M: It is neither legal nor illegal. It is questionable. I can't speak for the legal systems in other countries, but in the US, the "legality" of practices is often not settled until one party files suit against another, and a court makes a ruling. This might be of interest: http://www.w3.org/DesignIssues/LinkLaw
Michael Petrotta
@J3M: Here's a more on-target Wikipedia article: [Copyright aspects of hyperlinking and framing](http://en.wikipedia.org/wiki/Copyright_aspects_of_hyperlinking_and_framing): *In large part, linking and framing are not held to be copyright infringement under US and German copyright law [...] Some European countries take a more protective view, however, and hold unauthorized framing and so-called deep linking unlawful.*
Michael Petrotta
@Michael Petrott Interesting. Thanks. I also should mention that Stumble Upon is doing the same thing as Google Image search but even more out in the open. Check this out http://www.stumbleupon.com/su/1EPI1N/www.threadless.com/submission/285917/Monster_in_the_closet And this is Stumble Upon. I don't think they have been sued yet.
J3M 7OR3
@J3M: you seem committed to this approach. Go for it. Won't be easy, though, as I write in a comment to another answer.
Michael Petrotta
@Michael Petrott Yes I feel like emulating Stumble Upon's approach will be best for this web app however I will continue read the content your sent me to. Thanks.
J3M 7OR3
+2  A: 

The closest you can get is using (ick) frames, with one frame for your bar and one for the page. That's what Google Image Search does. It can easily get broken by frame-busting scripts though.

Matti Virkkunen
Sure, but you can always bring out the frame buster buster.
Williham Totland
@Williham: What about websites that have a frame buster buster buster?
Matti Virkkunen
Stop it right now or I'm turning this car around!
Michael Petrotta
Whoah! Deep, man.
Williham Totland
@Matti So you are referring to the <iframe> tag and these frame busting scripts would come from a user's browser or coded into a website one might visit while using the web app I mentioned above?
J3M 7OR3
@Williham I was just thinking about the idea of a frame buster buster when I was reading about frame buster scripts :) And I assume it is feasible to create a little script that can assume what level of frame busting (non busting) the browser is on to apply the proper iframe to the site.
J3M 7OR3
@J3M 7OR3: Yeah, that's swell, but your only recourse is a browser plugin.
Williham Totland
@Williham But why? Here we are talking about how it could be done with iframes. So why not just go that route?
J3M 7OR3
@J3M: You could do this with a frames approach. You'd need to a) always start from your framing site (no fresh new tabs); b) write the framing *very* *very* carefully - frames frequently break functionality; and c) be prepared to have a hosted site bust out of a frame. It's an arms race, and sometimes you'll lose.
Michael Petrotta
@Michael Petrott I do not understand point a). I assumed that I would start from my web app's home page. And what do you mean about fresh new tabs? b) Also I think I understand what you mean about writing them carefully. I read that browsers treat frames inconsistently. I do not understand how frames break functionality though. c) What does it mean for a site to break out of a frame? Where is it going to go? In my horizontal GUI bar?
J3M 7OR3
@J3M: So, I tried the Stumble Upon bar you mentioned below. I can simply click a bookmark in my toolbar, or enter a URL, and the SU bar goes away. The Facebook link seemed broken - not sure why. And as for "breaking out of a frame", search for "frame buster". Websites don't like toolbars like the one you're proposing, and will sometimes go to great lengths writing code to essentially remove the frame and destroy the toolbar.
Michael Petrotta
@J3M: Frankly, it's considered a somewhat slimy practice, as reflected in the lawsuits its engendered. The deeplinking suits are questionable, but I can understand a site not liking another site essentially "passing off" its content as their own with a frame.
Michael Petrotta
By the way, the owner of this site is one of those folks that doesn't like what you're proposing; here he is asking for countermeasures: http://stackoverflow.com/questions/958997/frame-buster-buster-buster-code-needed
Michael Petrotta
@Michael Petrott Yeah Jeff Atwood implemented the answer to his question cause it does not work in Stumble Upon. Part of me thinks it is a bit tight ass to go to those measures but part of me feels it is the right think to do. I am undecided though but will have a better idea after I read the links you sent me.
J3M 7OR3
@Michael Petrott Yes apparently this idea of mine is severly flawed based on what you said about being able to make the SU bar going away by clicking a book mark or entering a URL. But I must also say that the SU bar stays put when a user goes to another page or site when clicking a link. The problem is that the URL never changes from the original SU url. So say I go to http://www.stumbleupon.com/su/2pfyvZ/www.engadget.com/ and I click a link to another website and then click the "I Like It" button, what happens is that Engadget gets liked, not the site I am currently at.
J3M 7OR3
@Michael Petrott perhaps that best and safest path would be to have the SU style GUI bar + framing and browser extensions. More research to do. Thanks for your help though!
J3M 7OR3