Are IFrames (HTML) obsolete?

Peter picture Peter · Apr 16, 2009 · Viewed 60.4k times · Source

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?

Answer

Koraktor picture Koraktor · Apr 16, 2009

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:

  1. <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
  2. 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.