Why are frames deprecated in html?

HtmlFrames

Html Problem Overview


HTML has had frames from early days, but they are deprecated in the latest version. Many browsers (I have tried with Internet Explorer) don't even display frames properly.

Why has this been done? What was the drawback in frames?

Html Solutions


Solution 1 - Html

Jakob Nielsen wrote a 1996 column that criticized frames. Some key points:

  1. Frames prevent users from properly bookmarking pages. When a bookmarked frameset page is loaded, users' previous mouse clicks inside the frames do not matter. Only the outer URL is saved, and users have to navigate to where they were manually.

  2. Frames present challenges for printing web pages. Printing all the frames at once is not suited to the different dimensions of paper (and users can get only the first pageful that way). Users generally have to right-click the frame they want and choose the appropriate context menu option.

  3. Users coming from search engines may not have access to navigational elements if they are located in another frame — they are directed to only that frame the search engine found the text in.

While "framesets" (the most common type used on late 1990s/early 2000s web pages) are dying, the iframe (short for inline frame) remains alive and well. In fact, recently iframes have been found useful in today's "mashup" web applications, and extensions to the iframe are currently proposed in the HTML5 specification.

For example, Facebook, in its API for app developers, uses them to seamlessly integrate third-party apps with their own site while minimizing the security risk. (In this model, all third-party code remains on a separate domain, which is good for security reasons.)

Solution 2 - Html

Frames are not deprecated in HTML. They are obsolete in HTML 5, and just discouraged before this version. This has been clearly mentioned in the specified links.

Solution 3 - Html

Not to answer the OP but rather balance the bashing of framesets.

I find them great and nothing comes close to them when you want your menu intact and still:

  • Visually incorporate 3-rd party pages/apps (phpmyadmin or similar)
  • Viewing doctypes other than html (pdf's or images).
  • Due to its width="x,*" you get a simple "responsive" behaviour.

Also, you can provide smooth menu-animations while fetching main contents.

Used with sense, they're super.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSonOfTheEARThView Question on Stackoverflow
Solution 1 - HtmlPleaseStandView Answer on Stackoverflow
Solution 2 - HtmlPascal QyyView Answer on Stackoverflow
Solution 3 - HtmlTesonView Answer on Stackoverflow