Are IFrames (HTML) obsolete? [closed]
Solution 1:
Support for <iframe>
is still there in HTML 5, so I don't think this will change in the near future.
To answer your other questions:
-
<iframe>
s (as frames in general) are most of the time not user-friendly:- They don't allow easy access of the content in the frame via an URL (without losing the content outside of the frame at least).
- Most "technophobe" users are irritated by frames.
- As far as I know they are slower to render for browsers
- Alternatives include dynamic page generation (SSI, PHP, Rails and so on) and using JavaScript / AJAX to change contents of e.g. a
<div>
To be clear: I'm talking about <iframe>
as an interface element. Not a hidden element for loading other stuff like e.g. Google Mail does.
Solution 2:
In my opinion the W3C jumped the gun in dumping iframes from the Strict HTML and XHTML doctypes. In theory you would use the <object>
element to add foreign objects to your document, but browser differences and limitations have made this a nonstarter for many developers. With the much-more-pragmatic HTML 5 (which is still a draft), iframes are back and even have two new attributes: seamless
, and the intriguing sandbox
.