Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Why IFRAMES are totally awesome.
Old 01-08-2009, 10:29 AM Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
No... seriously. Iframes are very useful. Unfortunately, the way most people use them is completely STUPID. For those of you that just about jumped out of your pants, let me explain.

Let me say for the record, that I believe <iframe>s should pretty much never be used under normal use. They are often used as painfully sloppy crutches when things would be be much better left to the server, which can include chunks of HTML seamlessly, that will then be a natural part of the page, which a majority of the time, is what we need.

There is really only one circumstance in which we would ever want to use an <iframe>:

When we need a completely sterile environment included onto the page, that is free from the bonds of all CSS rules already in existance.

Why, you may ask, would we ever want to do this? There is one main reason:

Web applications. The best example I can point to is the tinyMCE WYSIWYG editor. The way the tinyMCE works, is it takes the HTML content of a <textarea>, wrapping it into a container <div>, hiding the <textarea>, then inserting an <iframe> as a sibling to the <textarea>, which recieves the HTML. The <iframe> is connected to its own stylesheet, allowing it to be completely independant of the page it is sitting inside, which is necessary to keep the editor looking consistently across any number of pages it is present on. When editing is done, the HTML goes back to the <textarea> so that it can be posted to the server. This way, the tinyMCE can have all its own style rules, and the developers won't have to worry about competing with an unknown quanity of styles when they style it. After all, the editor is meant to be ported to any application, website, or CMS that needs it.

The bottom line is, you should only ever be using an <iframe> if you KNOW WHAT YOU ARE DOING. It is a great tool when used correctly, as you can do many interesting programmatic things with it in the realm of JavaScript.

If you're not a programmer, as a general rule, don't use an <iframe>.

</rant>
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 01-08-2009 at 10:31 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
 
Register now for full access!
Old 01-08-2009, 10:33 AM Re: Why IFRAMES are totally awesome.
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
I totally dig what you're saying. First time I found a usef for iframes I felt the same way. And these days I LOVE divs. DIVS are so cool. I almost don't bother with tables any more. Actually what am I saying - in new developments, I DON'T bother with tables any more. Divs all the way.

Java applets and even good flash files are just like iframes in the one respect you mention - used rarely they can add finishing touches of pure brilliance to a site.
witnesstheday is offline
Reply With Quote
View Public Profile
 
Old 01-11-2009, 05:46 AM Re: Why IFRAMES are totally awesome.
Novice Talker

Posts: 15
Name: Jamal
Trades: 0
div's are better these days iframes are used some places where it is required. and they dint let the se's to crawl through from what i have heard.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
scriptbazaar is offline
Reply With Quote
View Public Profile
 
Old 01-16-2009, 10:54 AM Re: Why IFRAMES are totally awesome.
rabble's Avatar
Novice Talker

Posts: 9
Name: Troy
Location: Ohio
Trades: 0
I see no reason a search engine can't crawl your iframe pages if there is a link to the pageto be loaded into the iframe on your enclosing page somewhere.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
rabble is offline
Reply With Quote
View Public Profile Visit rabble's homepage!
 
Old 01-16-2009, 04:47 PM Re: Why IFRAMES are totally awesome.
RL4422's Avatar
Skilled Talker

Posts: 53
Name: Becky
Trades: 0
I hope that they can! I'm one of those idiots who still uses them. I'm working on advancing my programming language, but I'm kind of special.
__________________
- Becky -

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
RL4422 is offline
Reply With Quote
View Public Profile
 
Old 01-16-2009, 04:56 PM Re: Why IFRAMES are totally awesome.
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
SEs can read the source of an iframe, but the page inside the iframe will become an "orphan" rather than being content for the parent page.

Look at the first two results to see what happens.
http://www.google.com/search?q=site%...n.co.uk+iframe
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-17-2009, 09:23 AM Re: Why IFRAMES are totally awesome.
Junior Talker

Posts: 4
Name: Ankur
Trades: 0
[quote=wayfarer07;822028]No... seriously. Iframes are very useful. Unfortunately, the way most people use them is completely STUPID. For those of you that just about jumped out of your pants, let me explain.

Let me say for the record, that I believe <iframe>s should pretty much never be used under normal use. They are often used as painfully sloppy crutches when things would be be much better left to the server, which can include chunks of HTML seamlessly, that will then be a natural part of the page, which a majority of the time, is what we need.

There is really only one circumstance in which we would ever want to use an <iframe>:

When we need a completely sterile environment included onto the page, that is free from the bonds of all CSS rules already in existance.

Why, you may ask, would we ever want to do this? There is one main reason:

Web applications. The best example I can point to is the tinyMCE WYSIWYG editor. The way the tinyMCE works, is it takes the HTML content of a <textarea>, wrapping it into a container <div>, hiding the <textarea>, then inserting an <iframe> as a sibling to the <textarea>, which recieves the HTML. The <iframe> is connected to its own stylesheet, allowing it to be completely independant of the page it is sitting inside, which is necessary to keep the editor looking consistently across any number of pages it is present on. When editing is done, the HTML goes back to the <textarea> so that it can be posted to the server. This way, the tinyMCE can have all its own style rules, and the developers won't have to worry about competing with an unknown quanity of styles when they style it. After all, the editor is meant to be ported to any application, website, or CMS that needs it.

The bottom line is, you should only ever be using an <iframe> if you KNOW WHAT YOU ARE DOING. It is a great tool when used correctly, as you can do many interesting programmatic things with it in the realm of JavaScript.

If you're not a programmer, as a general rule, don't use an <iframe>.

</rant>[/quote]

i Frame is truely great, however most people dont know how to use and that is one reason we havent seen much of it
ankur is offline
Reply With Quote
View Public Profile
 
Old 09-07-2009, 04:57 PM Re: Why IFRAMES are totally awesome.
rabble's Avatar
Novice Talker

Posts: 9
Name: Troy
Location: Ohio
Trades: 0
This thread has totally screwed me up for months!

I got to thinking ... maybe iframes were totally Awesome!
So ... I created an index page for my website with four iframes thinking ...
AWESOME. Now I could, using javascript, load every page I ever created into my front index page.

WARNING
don't try this in the real world unless you want to spend
a lot of time fixing what wasn't broken.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
rabble is offline
Reply With Quote
View Public Profile Visit rabble's homepage!
 
Old 09-07-2009, 07:13 PM Re: Why IFRAMES are totally awesome.
Chris`'s Avatar
Average Talker

Posts: 26
Name: Chris
Location: California
Trades: 0
I disagree with you. If you know what you're doing, it's easy to set a block of content to use a specific style, or even emulate an iframe. There is no reason you should ever need to use an iframe, especially if it's because you want to keep the css separate. It's so easy to assign a class or id to whatever content you would otherwise place in an iframe.

And of course, search engines wont see this as content on a page. So if it's any significant importance to your web page or it's purpose, then this would be a really bad idea.

And on top of all of this, if you're going to incorporate javascript with your iframe, then don't do it that way. Use AJAX, pull the content in the background and display it as it happens. There's not need to have all that iframe code and use multiple files that half of the code, etc..

iframes are outdated, and useless to experienced developers. It's bad for SEO, it can cause confusion to the visitor, it can look really bad if not integrated well with the design. And it's purpose can be reproduced with AJAX.
__________________

Please login or register to view this content. Registration is FREE
| Fast, Reliable, cPanel Hosting.

Providing Unreal Support, hosting happy customers.
Advanced Hosting Solutions, We Purge the Competition.
Chris` is offline
Reply With Quote
View Public Profile Visit Chris`'s homepage!
 
Old 09-07-2009, 08:40 PM Re: Why IFRAMES are totally awesome.
Novice Talker

Posts: 10
Trades: 0
I really don't like iframes, although it is useful at times, but overall, i dont like it at all.

Iframe can be useful when you cleverly and almost legally steal another site's content. Just like this www.tutorialized.com
Jeffreyw is offline
Reply With Quote
View Public Profile
 
Old 09-07-2009, 09:56 PM Re: Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by rabble View Post
I got to thinking ... maybe iframes were totally Awesome!
So ... I created an index page for my website with four iframes thinking ...
AWESOME. Now I could, using javascript, load every page I ever created into my front index page.
Quote:
Originally Posted by wayfarer07 View Post
Unfortunately, the way most people use them is completely STUPID.
Quote:
Originally Posted by wayfarer07 View Post
The bottom line is, you should only ever be using an <iframe> if you KNOW WHAT YOU ARE DOING.
Need I say more?
Quote:
Originally Posted by Chris` View Post
And it's purpose can be reproduced with AJAX.
Only if you don't understand its purpose. There are things that may be done with an IFRAME that are impossible with AJAX.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 09-07-2009 at 10:01 PM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 03:04 AM Re: Why IFRAMES are totally awesome.
Chris`'s Avatar
Average Talker

Posts: 26
Name: Chris
Location: California
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
Only if you don't understand its purpose. There are things that may be done with an IFRAME that are impossible with AJAX.
I would love to see an example of this.
__________________

Please login or register to view this content. Registration is FREE
| Fast, Reliable, cPanel Hosting.

Providing Unreal Support, hosting happy customers.
Advanced Hosting Solutions, We Purge the Competition.
Chris` is offline
Reply With Quote
View Public Profile Visit Chris`'s homepage!
 
Old 09-09-2009, 03:11 AM Re: Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Did you know that every time you post a message in the editor right here on Webmaster Talk, you are typing into an IFRAME?
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 03:14 AM Re: Why IFRAMES are totally awesome.
Chris`'s Avatar
Average Talker

Posts: 26
Name: Chris
Location: California
Trades: 0
I'm pretty sure it's not an iframe.. I'm familiar with vBulletin, in fact, I know it's an AJAX reply. That's how you're able to add a reply to a topic without reloading the entire page, like with most other CMS. The whole action is handled via javascript.
__________________

Please login or register to view this content. Registration is FREE
| Fast, Reliable, cPanel Hosting.

Providing Unreal Support, hosting happy customers.
Advanced Hosting Solutions, We Purge the Competition.
Chris` is offline
Reply With Quote
View Public Profile Visit Chris`'s homepage!
 
Old 09-09-2009, 03:21 AM Re: Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
As to examples of things an IFRAME may do that AJAX cannot, try uploading a file with AJAX. This cannot be done, because AJAX methods can't send files.

But wait! I have seen this effect where files are uploaded without page refresh!

... done with an IFRAME.

An IFRAME can be used to access an external website. This is useful for certain public APIs such as instant shopping carts. AJAX can't access external sites because of JavaScript's strict same-source policy, which is a security measure. This is also used by Google Images to peek at whole website pages.

An IFRAME allows scripts it contains to run independent of the parent window. This is an important concept which is vital to all major WYSIWYG apps. It is also useful for doing demos of code such as almost all of examples on http://docs.jquery.com

AJAX and IFRAME don't really compare much, since they do very different things.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 03:23 AM Re: Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by Chris` View Post
I'm pretty sure it's not an iframe.. I'm familiar with vBulletin, in fact, I know it's an AJAX reply. That's how you're able to add a reply to a topic without reloading the entire page, like with most other CMS. The whole action is handled via javascript.
Nope, it's an IFRAME. I've firebugged it several times, curious what was going on in there. All major WYSIWYG editors on the internet use an IFRAME. Trust me, I've hacked their code alot.

***EDIT***
Of course, there is also a lot of scripting going on, but not AJAX replies. AJAX replies from an IFRAME to its parent would be redundant. You should note that updating the page without refreshing is just something that JavaScript can do. The only time there is an AJAX call is when the save button is pressed, then the HTML from the IFRAME populates the page and its content is sent to the server.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.

Last edited by wayfarer07; 09-09-2009 at 03:29 AM..
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 09-09-2009, 07:54 AM Re: Why IFRAMES are totally awesome.
Experienced Talker

Posts: 32
Name: shozib ali
Trades: 0
u can adds in movie players etc.. so that if any one copies..ur add displays at their end..
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
shozib is offline
Reply With Quote
View Public Profile
 
Old 09-10-2009, 12:32 AM Re: Why IFRAMES are totally awesome.
Super Talker

Posts: 101
Trades: 0
A guy I know wrote a program called Deliverance (it's written in Python I think). The program works like a dynamic iframe, it can be used to display content from any site on to another and unlike Iframes the content inside can be indexed by search engines. If one needs to use iframes extensively this can be a viable alternative.

http://www.coactivate.org/projects/d...e/introduction
Towhid is offline
Reply With Quote
View Public Profile
 
Old 09-10-2009, 07:26 AM Re: Why IFRAMES are totally awesome.
Chris`'s Avatar
Average Talker

Posts: 26
Name: Chris
Location: California
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
Nope, it's an IFRAME. I've firebugged it several times, curious what was going on in there. All major WYSIWYG editors on the internet use an IFRAME. Trust me, I've hacked their code alot.

***EDIT***
Of course, there is also a lot of scripting going on, but not AJAX replies. AJAX replies from an IFRAME to its parent would be redundant. You should note that updating the page without refreshing is just something that JavaScript can do. The only time there is an AJAX call is when the save button is pressed, then the HTML from the IFRAME populates the page and its content is sent to the server.
I know AJAX uploaders use an iframe. But that wasn't my point to begin with, and those are services and aspects of the site that otherwise don't carry any significance to the purpose of the site. With that said, that's a perfectly liable reason and place for using an iframe, but a website should not be dependent on the content an iframe displays where if missing would degrade the website.
__________________

Please login or register to view this content. Registration is FREE
| Fast, Reliable, cPanel Hosting.

Providing Unreal Support, hosting happy customers.
Advanced Hosting Solutions, We Purge the Competition.
Chris` is offline
Reply With Quote
View Public Profile Visit Chris`'s homepage!
 
Old 09-10-2009, 10:35 AM Re: Why IFRAMES are totally awesome.
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by Chris` View Post
but a website should not be dependent on the content an iframe displays where if missing would degrade the website.
For the most part I agree with this. It only has special uses and should not normally be used. My only point is that it shouldn't be ignored completely, at least not by professional developers. Novices should learn how server side includes work before they learn anything about the IFRAME.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Why IFRAMES are totally awesome.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.10006 seconds with 12 queries