Thread: iframes
View Single Post
  #9   Spotlight this post!  
Unread 21-10-2004, 22:48
jonathan lall's Avatar
jonathan lall jonathan lall is offline
Registered User
FRC #2505 (The Electric Sheep; FRC #0188 alumnus)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Toronto, Canada
Posts: 547
jonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond reputejonathan lall has a reputation beyond repute
Send a message via MSN to jonathan lall
Re: iframes

Let me add in some commentary that should clear a bit of this up and lay to rest a few fallacious notions that I see about frames every once in a while.

Quote:
Originally Posted by Jack
There is really no "correct" answer to your question. It is true that iframes are not as widely supported by different web browsers, and are more likely to be displayed differently in different browsers, this being the reason why some hate them with passion.
To which browser are you referring, specifically? In all fully-functional browsers I've used, iframes are "supported." They are displayed slightly differently across the board, like anything else (and behave strangely and improperly when viewed with the Usual Suspect), but all browsers worth worrying about will do them just fine for everyday tasks. For this reason, I find it hard to condemn frames because they look different in different browsers. I mean... text sizes look different from IE to Mozilla to Safari. Should we not use text?

Quote:
Originally Posted by Jack
When used correctly, an iframe can add an extreme amount of functionality to a website that would be hard to achieve through other means. [...] I’m sorry but I really don’t have an example of a good looking iframe vs a bad one.
Let me just add to this to say this iframe "look" thing is totally subjective, and is also a silly reason to preach not to use them. I can, and have made an iframe look completely seamless. As Jack pointed out, iframes and frames can do unique things from both visual and structural standpoints that can turn out to be very useful. Those of you who suggest the use of includes instead of frames as some all-encompassing solution miss the point of their existence entirely (although in some specific cases includes are perfect for the job).

Case: the Webmaster has some CGI forum software he wants to integrate into the look of his site. He is either unable or unwilling to delve into the source code to include the forum contents between a header and a footer. Instead, he takes the final output (i.e. website.com/forum/index.cgi, a nice, clean, generated text/html page) and slaps it in an iframe placed within his site layout template. An important advantage to this approach (as Greg Marra sort of pointed out) is that the layout no longer needs to be loaded as someone clicks through links in the forum. Problem solved. Time elapsed: like... five minutes.

An aside: if you want to have a static menu and a scrolling content area, do yourself a favour and use includes with CSS to simulate the visual effect. It is this specific usage that makes people hate frames with a passion.

Quote:
Originally Posted by Jack
Lastly, I should mention that often search engines do not handle frames well at all, and therefore if it is important that the content inside the iframe is spidered, that factor may influence your decision again them.
This is absolutely true, but good semantic coding can defeat the majority of these problems, at least with Google. If user-agents and consumers can tell that something is part of a bigger picture, the problem is not so big anymore. For example, while this does not solve search engine spidering problems (use meta tags for that!), one can use Javascript to determine if a page is enclosed in a frame or not, and then based on that detection, load the frameset as it is meant to be seen.

Quote:
Originally Posted by Matt Attallah
I like I-Frames - but older browsers don't like them and if I rember correctly they are not W3C compliant (something of that such)
I'm sure you mean by that statement that the iframe element is not part of the HTML specification put out by the W3C. This is incorrect.

Quote:
Originally Posted by Matt Attallah
That's the one downfall.

When this page was implemented it was at a fixed pixel. No resizing, no nothing.

If you mess with it you can get it to where everything tries to stay inside the main window it'll all work - but i will admit you are pretty much stuck with the size.

It was planned for people with larger resolutions running IE...
Element dimensions can be defined as percentages of the browser window size (or the enclosing box element's size), which the browser can calculate in real time as you resize the window. And of course you don't need me to tell you how infuriating it is to still be seeing suggested resolutions and browsers at this day in age. Judging by the smilie, I think Matt is well aware of that.

Quote:
Originally Posted by Roland
That's a really good example of why everyone hates iframes. Jesus.
Don't blaspheme. Or diss other peoples' work for that matter. Well, you can do either, but I doubt either will make you any new friends here. More importantly though, the theory behind that implementation is likely similar to that of the aformentioned case study. While visually it might not always work, saying "frames suck" because of that is hardly reasonable.
__________________


Last edited by jonathan lall : 21-10-2004 at 22:51.