Can someone explain to me the pros/cons of using IFRAMES and what better alternative there are?
Who is Participating?
Julian HansenConnect With a Mentor Commented:
iframes are good for including offsite content (content provided by an external entity). They allow you to encapsulate functionality in your site that someone else has developed with minimal effort. The down side is
a) You don't have control on the look and feel
b) You cannot interact with the page
c) Changes in the iframe stay in the iframe - for instance if you iframe a page with a navigation system - the browser URL does not change when the navigation in the iframe changes.

What are the alternatives? The trend is now to move toward API's - you call an API to get the data / content you want and then you place that on the page. Not all situations are suited to this approach. It has the advantage of giving you control over the look and feel while sourcing the content from another location - even if that content is rendered HTML - you can still provide your own styling and use JavaScript to interact with the content.

Iframes will always be popular in environments like WordPress where web admins want to include functionality (for instance a CRM form) from an external service but don't want to have to code it up - a pre-built widget they can include with an IFrame will be a win so I don't see the iFrame disappearing anytime soon.

Whether to use or not - I use the rule of thumb - use as a last resort.
Lucas BishopConnect With a Mentor Click TrackerCommented:
It really comes down to how they're being used. Today, the only time I ever see them used for a good reason is in loading third party ads inside of them -- as they don't effect the loading of the main page of content. This is generally done via a "SafeFrame":
Thomas Zucker-ScharffConnect With a Mentor Systems AnalystCommented:
One of the reasons iFrames are not as popular as they used to be is SEO.  Generally, although it depends on how they are programmed and used, iframe content does not get as easily indexed by search engines.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

tmajor99Author Commented:
are there compatibility issues with IFRAMES and browsers liek IE, CHrome and Firefox?  Do IFRAMES cause a security risk?  DO IFRAMES work with Tablets with IPhones?
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
I use iframes for pages that use different layout and CSS than the parent page.  All browsers display iframes although you can run into problems with how an iframe is displayed on smaller devices.  They do not (by themselves) pose a security risk.  They are just a way of including a page in another page.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
If you can provide an example use case that you are going to work on, you will get better answers for your specific project.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.