I think as the debate on using tables or not, the use of iframes has been second to that.
Inline frames, also known as iframes as described by Wikipedia:
An inline frame places another HTML document in a frame inside a normal (rather than frameset) HTML. document.
The use of iframes for years has been much of a beginner’s fad in designing. It allows the user to make a small website and put all their content in a small area. However, as time passed, people were abusing this more than using frames. An iframe calls another page to load, so instead of 1, you will have more than one depending on how many iframes you have placed on your layout. Some web page newbies decided to place their content in a larger window, so now only did their content scroll, but their page, even in larger browsers.
Why not to use them?
1. Well, often the page is not indexed correctly by the search engines. Search engines will often overlook the iframe and then the design is broken. This is not good for the designer.
2. Some browsers may not show the iframe properly or at all.
3. Using the iframe could take more load time for your users. Remember, even though there is broadband, there are still people out there that only have access to the Internet via dial-up, and even if the modem handles 56K, it does not always connect even that close.
4. Using the iframe as a means to place content is not exactly a good excuse if you are allowing the window to be large in length. Rather than use the iframe, you can place your content in division layers. It is just as easy to code and makes your layout more flexible if one page is longer versus another page.
There are more efficient and better means to coding layouts than using iframes. What other reasons are there? If you are one that supports iframes, why?
David says
While I understand your reasons for NOT using them, there still exist very valid reasons for using them.
One example is in an enterprise portal or intranet. Our LMS (Learning Management System) at my university uses iframes to allow instructors to bring outside web pages into the environment.
Additionally, while you say that some browsers won’t show the iframe (as if older browsers like IE6 have issues with them or something), it was quite the opposite in the case of embedding Google Maps.
EX:
http://blog.poplabs.com/2009/08/28/embedding-google-maps-iframe-to-object-with-xhtml-strict/
Switching from Transitional to Strict deprecates the iframe, and you have to use the object tag instead. But IE6 and 7 won’t show the map with this method. So, instead, you would use JavaScript to pull in the content.
And at that point, if you’re assuming all users have JS turned on, there are much better methods than iframes and embedded objects to begin with, such as modal windows and lightboxes for multimedia or external content.
I’m all for forward-thinking, progressive attitudes in web design and development… but some take it too far. Stating you should “not use them” about iframes falls in this line of thinking.
There are, in fact, times when they are still appropriate; however, they are definitely on their way out.
Nile says
I actually took those reasons into consideration. Since you have not been on my site before it was Blondish.net or even back when I was playing around on GeoCities years ago, I happened to use iframes. In fact, I had a lot of fun and creative layouts back then using layouts like that. I even for a time when I got into using b2, I did that. THEN, thankfully to some of my code ninja W3 savvy friends, introduced me more into design. In fact, they are all professionals in web development today, so I am grateful for their input. Iframes soon became a novelty and I still consider it so. Although I would not tell someone if they had me review their iframe site to do without, I would at least hope they are using them within reason.
I also have seen a lot of mistakes over more than 8 years focusing on designing websites in this. I think that it should not be a first option, but that does not mean that you should rule it out totally.
If you can code and use it within a means to be creative with your site without going overboard. When you have been around the community as I have, seeing a person use more than 2 or 3 iframes and you still have to scroll even in an 800×600 on a layout that would have looked better without the iframe, that is not the best solutions. It IS a hindrance scrolling if you have to scroll your browser and THEN the section. Also, I have lived in the boonies of Southern Illinois where DSL, cable, and even Wireless have problems reaching. In fact, at my parents, they live about 2 miles outside Centralia, and can online get dial-up. Their Wireless Verizon USB cards sometimes do not get any signal and when it does, it is 1 bar. Yeah – Verizon and their regular phone reception is thankfully better than most other providers in the area (that is said with experience from going through so many myself after being frustrated with not having connection.)
This is more written for those who are beginners. It is annoying to wait a long time for a site to load, and those who are novices may do things like put lots of bulky banners and other info (just examples I have seen in the past.)
Also, it still is not read correctly in the search engines, so those into SEO, they will want to steer clear of iframes, especially in using them to display their main content.
Vera says
I hate i-frames with a passion, but sometimes, they’re a necessary evil. For example, for work I had to code a website which had a map application on the homepage. Basically, you had a map, which you could click on and see various traffic information in various towns.
Since, the page was not supposed to redirect you elsewhere, there was no other way to incorporate the map’s page into the website.
Lydia says
I was around in the ‘oldened’ days.It’s amazing the layouts done with iframes. I think as said by Vera, it could be used for certain things. Overusage, I agree it shouldn’t be done.
I don’t really care about it unless I can’t view the site right or it is annoying to navigate.
Katy says
I use to use iFrames but don’t use them anymore. I usually just use CSS, div layers and PHP when creating websites now.
I don’t hate iFrames as much as regular frames though.