Are IFrames (HTML) obsolete? [closed]

2019-01-04 09:53发布

Getting contradictory messages about that, hope they're not. I cannot imagine support for it would stop, since a gazillion sites use them.

Some additional questions about that:

  1. Why should they phase out this tag?
  2. Any alternative for it?

14条回答
Bombasti
2楼-- · 2019-01-04 10:44

They can be extremely useful in some circumstances, but those are limited. In particular embedding common functionality across multiple sites.

For example I have a client who runs a number of Scottish goods e-commerce sites. As part of this we have developed a couple of simple applications to locate possible clan names from your surname or your choice of tartans (giggle if you wish but tartans are worth $700 million a year to our economy). The database behind this is surprisingly large (nearly ten thousand rows in the core names and tartans tables) and fairly regularly updated.

So we have the applications set up to run on one website and then embedded these into our other websites using an iframe, enabling simple javascript parameter passing so we can integrate the selection of a tartan or clan with functionality on the embedding site. The iframe is set as noborder so it appears completely seamless to the end user.

Of course there would be other ways of doing this, but the use of an iframe is simple and robust. And it's certainly not obsolete.

查看更多
再贱就再见
3楼-- · 2019-01-04 10:49

I work for a company that used frames for everything from pull down menus, lists, content blocks, etc just to cover the intricacies of .net web forms. The application is very slow and only runs on IE. Don't do this.

查看更多
登录 后发表回答