1

I would like to use iframe html5 tag in my web project (ASP.NET MVC5). But I am wonder the browsers not allowed display content. So is using iframe dead?

My goal is wrap the payment gate window to iframe tag and place to my web page.

Milan Pračko
  • 33
  • 1
  • 6
  • Nope, iframes are definitely not dead. – phuzi Mar 01 '18 at 12:26
  • OT: Depending on your payment provider, they might actually provide their own implementation that you can embed into your site (which could in turn use an iFrame) but if you use their way, it generally makes PCI Compliance easier to deal with. – webnoob Mar 01 '18 at 13:08

2 Answers2

5

Iframe is not dead. It is still widely used, mostly for advertisement (third parties can serve content without intervention from the site admin). This answer mentions some valid points.

You can separate websites and domains easily without security concerns (cross-domain policy). That makes it unique and irreplaceable.

ericek111
  • 575
  • 7
  • 15
  • You're right, that was a wild assumption and I edited my answer. There was a spike in its popularity in 2015, but the decline in [job vacancies](https://www.itjobswatch.co.uk/charts/permanent-demand-trend.aspx?s=asp.net&l=uk) and [usage](https://trends.builtwith.com/framework/ASP.NET) since gave me some second thoughts when I was deciding whether it's worth learning it or not. – ericek111 Mar 01 '18 at 12:38
-3

It works?

Yes.

But...

It was deprecated in HTML5, tough some browsers still support it I do not recommend you to use it in your projects.

The problems

1) It was removed from web standards, you maybe get some problems while trying to access your page from newer browsers.

2) It's SEO unfriendly. A webpage was supposed to only have one URL, but if you use frames your page will have multiple URLs (one for each frame).

3) If the frame source isn't reliable you can get security problems.

Sites that use it

JS Bin, JS Fiddle and Codepen are good examples.