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?
-
"Initially" is false. But otherwise this stands.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2010年11月24日 04:42:09 +00:00Commented Nov 24, 2010 at 4:42
-
11Well, the problem is that they exist. :)Alex– Alex2010年11月24日 04:43:43 +00:00Commented Nov 24, 2010 at 4:43
-
3Frames still work. Javadocs still use frames and render reliably across all major browsers. Example here: download.oracle.com/javase/7/docs/apiAsaph– Asaph2010年11月24日 04:45:03 +00:00Commented Nov 24, 2010 at 4:45
-
I actually use frames because I DON'T want the user to save an internal url. I'm sure there's probably another way to get that done these days but old habits die hard when you don't learn the new tricks.user2506885– user25068852013年06月20日 21:01:17 +00:00Commented Jun 20, 2013 at 21:01
-
1Frames are very useful in some cases: reframe.deneskellner.com is a good example. I could have done it without frames of course - but it is so straightforward and effortless this way. I can't understand why deprecation is the answer when something goes out of fashion.dkellner– dkellner2017年05月24日 20:24:33 +00:00Commented May 24, 2017 at 20:24
3 Answers 3
Jakob Nielsen wrote a 1996 column that criticized frames. Some key points:
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.
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.
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.)
6 Comments
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.
7 Comments
iframe
is not obsolete in HTML5. Other frames are though, such as frameset
. Using an iframe
is useful for implementing cross-domain application logic.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.