Can someone explain to me the pros/cons of using IFRAMES and what better alternative there are?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lucas BishopClick 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-ScharffSolution GuideCommented:
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.
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?
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Dave BaldwinFixer 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.
Julian HansenCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.