Framing (World Wide Web)
This article needs additional citations for verification. Please help improve this article by adding reliable references. Unsourced material may be challenged and removed. (January 2008) |
This article may contain too much repetition or redundant language. Please help improve it to fix this issue. (January 2008) |
On a web page, framing means that a website can be organized into frames. Each frame displays a different HTML document. Headers and sidebar menus do not move when the content frame is scrolled up and down. For developers frames can also be convenient. For example, if an item needs to be added to the sidebar menu, only one file needs to be changed, whereas each individual page on a non-frameset website would have to be edited if the sidebar menu appeared on all of them. However, server-side includes and scripting languages such as PHP can also be used to accomplish this aim without some of the drawbacks of frames such as confusing the operation of the address bar and back and forward buttons.
History
File:Wiki letter w.svg | This section requires expansion. |
Netscape 2.0 introduced the elements used for frames in the 1990s (see Netscape Navigator). At that time, Netscape proposed frames to the W3C for inclusion in the HTML 3.0 standard.[1]
Syntax
The frameset replaces the <body>
and </body>
tags, and describes the dimensions (in percentages) of the frames. These percentages should add to 100, though the last one may be replaced with an asterisk as a shortcut to the remaining screen space.[2] Within the frameset, the framed panels are described with their source documents. The <noframes> element may be included so browsers with frames disabled (or browsers that don't support frames) can display something to the user, as in this example:
<frameset cols="85%, 15%">
<frame src="URL OF FRAME PAGE 1 HERE">
<frame src="URL OF FRAME PAGE 2 HERE">
<noframes>
Text to be displayed in browsers that do not support frames
</noframes>
</frameset>
Content sources
The contents of the frames may be hosted on the same server as the parent page, or it may link in code from another website server such that these external contents are automatically displayed within the frame (transclusion or remote loading). This may be confusing and inconvenient to the users: they can get the impression that the information belongs to the same website; also, less than the full browser window is available and the address bar is less informative. Some websites request not to be used in this way on other websites; some discourage it by including a framekiller script in its pages. The framing website runs a risk of being blamed for external content that, for example, is or becomes inaccurate or objectionable.[3] In addition, there may be legal issues associated with framing, in that the owner of the external content may object to the involuntary (and possibly objectionable) implied association with the framing website. Visitors may confuse ownership of copyrights or trademarks of the external site with the owner of the framing site.
Criticism
Chief criticism of the practice of framing HTML content includes:
- Framing breaks the link between content and a URL, making it difficult to link to or bookmark a particular item of content within the frameset[4]
- The implementation of frames is inconsistent across different browsers[4]
- Framing confuses the boundaries between content on different servers,[5] which raises issues of copyright infringement[6]
- Visitors arriving from search engines may land on a page intended for display in a frame which has no navigation [7]
- Frames change the behavior of the back button[7]
- Frames usually don't print the way users expect they will[6]
- External links on web pages which use frames may cause other pages to appear in the frameset.
- If the screen resolution or browser window size is too low then each frame will have scroll bars which can look messy and uses up already limited space. Such behaviour typically resulted more from bad site design (fixed layouts instead of fluid layouts), whereby not all frameset features were put into proper use.
- This behaviour could be mitigated by:
- disabling scrolling for smaller frames that typically didn't require a scrollbar;
- using fluid design characteristics in target pages instead of fixed designs, so that the content wouldn't cause horizontal scrollbars in the first place.
Replacements
Although frames were included in the XHTML 1.0 specification, they were not carried across to XHTML 1.1. The intended eventual replacement is XFrames,[8] which attempts to solve the problem of addressing a populated frameset through composite URIs. For those serving web content under the XHTML 1.0 specification, documents may be embedded within one another via either the object
or iframe
element tags. Under the 1.1 specification, iframe
was removed, leaving only the object
element for transclusion until browsers begin support for XFrames. Unfortunately, Internet Explorer 7 does not handle object
s used to replace the function of an iframe
, it doesn't recognize that a link from within the included page has the containing page as its _parent
. Therefore constructing a menu to be included on every page, in imitation of a frameset
, fails as the parent frame cannot be targeted. KHTML and Gecko based browsers, like Konqueror, Safari and Firefox, however, work perfectly well with this construct.
Frames become invalid in HTML5[9], with the exception that iframes remain.[10]
See also
References
- ↑ "Using HTML 3.2, Java 1.1, and CGI; Ch. 13, Frames". http://docs.rinet.ru/HTMLnya/ch13.htm.
- ↑ "Frames in HTML Documents". W3C. http://www.w3.org/TR/REC-html40/present/frames.html.
- ↑ "Aardvark's Linking Policy". http://www.aardvark.co.nz/linking.htm.
- ↑ 4.0 4.1 Nielsen, Jakob (December 1996). "Frames Suck Most of the Time". http://www.useit.com/alertbox/9612.html.
- ↑ "I Hate Frames Club". http://budugllydesign.com/frame9806/frames9.htm.
- ↑ 6.0 6.1 "Why are frames so evil?". http://www.html-faq.com/htmlframes/?framesareevil.
- ↑ 7.0 7.1 "The Pros and Cons of Frames in Web Pages". http://www.mediacollege.com/internet/html/frames/pros-cons.html.
- ↑ "XFrames working draft". W3C. http://www.w3.org/TR/xframes/.
- ↑ HTML 5 differences from HTML 4: "The following elements are not in HTML 5 because their usage affected usability and accessibility for the end user in a negative way: frame, frameset, noframes"
- ↑ HTML 5 differences from HTML 4: "new sandboxing features for iframe"
External links
- HTML Help: What's wrong with frames?
- Dan's Web Tips: Frames
- Script designed to prevent framing of your content
ar:تركيب (الشبكة العالمية) de:Frame (HTML) it:Frameset nl:Frame (HTML) pt:Enquadramento (World Wide Web) ru:Фрейм (HTML)
If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...
- Pages using deprecated source tags
- Pages with syntax highlighting errors
- Pages with broken file links
- Articles needing additional references from January 2008
- Articles with invalid date parameter in template
- All articles needing additional references
- Wikipedia articles needing style editing from January 2008
- All articles needing style editing
- Articles to be expanded from January 2008
- All articles to be expanded
- World Wide Web