Framing (World Wide Web)

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

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

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 objects 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

External links

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

Explore the new cs2 skin bet on besoccer.com for skins and free bonuses