Possible Duplicate:
Are iframes considered 'bad practice'?

While dealing with web-developers, I usually listen to them that using iframes is one thing we should avoid once we can, plus some say it is something bad, annoying and makes lots of problems.

Also after i told these boss "not really a developer" eventually which i uses iframe, he checked out me like a bad developer :)

What i wish to know, does iframes possess a bad history with web design?

Could it be a tragedy?

In some instances I observe that you have to use iframes, says which means I'm a bad developer?

Or all that due to it's difficult to cope with due to some security issues we should be mindful about while developing?

Please list your points should you hate it too or correct me should i be thinking the wrong manner.

Iframes might have similar issues as frames and inconsiderate utilization of XMLHttpRequest: They break the main one-document-per-URL paradigm, that is required for the correct functioning from the web (think bookmarks, deep-links, search engines like google, ...).

If you are developing a web application, go to whichever technique you need to (including frames, expensive, applets, $whatever). If you are creating a real, educational web site, stay with frameless HTML, CSS and unobstrusive JavaScripts and bear in mind the page should be functional with scripting disabled.

As Nosredna stated, it's most likely because individuals confuse all of them with frames, and you will find really lots of valid arguments against frames. A number of them aren't relevant to iframes, however again a number of them are.

Probably the most striking such problem is most likely those of deep connecting: So iframes are afflicted by this to some lesser extent than frames, but when you permit your customers to navigate between different pages within the iframe, it will likely be an issue. Gleam handful of usability issues that you will need to be careful for. The most typical examble is double scrollbars, that we personally find incredibly annoying.

I am inclined to avoid iframes, mostly because I've found so that it is an unelegant solution. I have discovered that after i really sit lower and consider it, there's more often than not a much better solution. Despite the fact that I additionally think that there's a spot for them. It is the goto from the web world: Simply because it features a good reputation for being misused, it is consensus it should not be used. That actually is not the situation here, but I do think that you ought to think hard before using iframes.

I added that more often than not, iframes don't help Search engine optimization of the page either. Googlebot does not place the content of the iframe around the page.

I believe people confuse iframes with HTML frames, and frames are pretty globally despised.

People use iframes constantly without recognizing it. Basically recall properly, TinyMCE uses iFrames.

One reason is security -- iframe injection attacks were pretty common. Check this out Ars Technica page for any description:


and the other page that summarizes some weaknesses (I'm not sure the number of of those are valid for that current crop of browsers, however the article's not too old):

http://world wide web.thespanner.co.united kingdom/2007/10/24/iframes-security-summary/

However, they enable mix domain communication, and therefore are used quite generally by "ajaxy" webapps:


There's one situation where iframes are (almost) needed: once the items in the iframe is within another domain, and you've got to do authentication or check snacks which are certain to that domain. It really prevents security problems rather than creating them.

For instance, if you are writing a type of wordpress plugin you can use on any web site, however the wordpress plugin needs to authenticate on another domain, you can produce a seamless iframe that runs and authenticates around the exterior domain.