开发者

A question of opinion: Are you still using iframes?

开发者 https://www.devze.com 2023-02-13 18:41 出处:网络
Do iframes still fit the mold of current web standards? The technology is old but I am seeing them resurface - especi开发者_运维知识库ally with the new youtube embed code being iframes and facebook ju

Do iframes still fit the mold of current web standards? The technology is old but I am seeing them resurface - especi开发者_运维知识库ally with the new youtube embed code being iframes and facebook just allowing custom tabs to be iframes as well.

My question is basically: Are the acceptable?


Have a look at this SO question: Are IFrames (HTML) obsolete?

In short: They are part of the HTML 5 draft and will be sticking around. If used correctly, I think they are acceptable. :)


I agree with everyone that they should be a last resort, but there are certain things that demand the use of iframes.

For instance, there's no better way to do ajax file uploading than posting to an iframe and then reacting to the iframe's onload event to handle it.


Yes, my company still uses iFrames to embed third-party content on our site.

They still have a place but, IMHO, should be a last resort.


A lot of components such as Facebook's social widgets or Youtube's embeded player use iframes.

I also use some, when needed. Of course I don't abuse it because it's not adapted for all situations.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号