Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are frames deprecated in html?

Tags:

html

frames

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?

like image 217
SonOfTheEARTh Avatar asked Nov 24 '10 04:11

SonOfTheEARTh


People also ask

Why are HTML frames bad?

Frames are more difficult to bookmark and, therefore, more difficult to share with others.

What was the cause of deprecating frame tag in HTML5?

First, the frame and frameset elements are not deprecated in HTML5, they're obsolete (i.e., they've been removed entirely). The frame element replaces the body element in pages as a means to include a different document model for web pages: they're bad for usability and accessibility. thats why Frame has been removed.

Is iframe going away?

IFrames are not obsolete, but the reasons for using them are rare. Using IFrames to serve your own content creates a "wall" around accessing the content in that area. For crawlers like Google, It's not immediately clear that cotent in an iframe will be ranked as highly as if the content were simply part of the page.

What can I use instead of frames in HTML?

The object tag is an alternative to the iframe tag in HTML. We can use the tag to embed different multimedia components like image, video, audio, etc. The object tag has an attribute data where we can define the URL of the webpage to be embedded.


2 Answers

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.)

like image 179
PleaseStand Avatar answered Oct 01 '22 10:10

PleaseStand


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.

like image 23
Pascal Qyy Avatar answered Oct 01 '22 11:10

Pascal Qyy