Framing (World Wide Web)
   HOME

TheInfoList



OR:

In the context of a
web browser A web browser is application software for accessing websites. When a user requests a web page from a particular website, the browser retrieves its files from a web server and then displays the page on the user's screen. Browsers are used on ...
, a frame is a part of a web page or browser
window A window is an opening in a wall, door, roof, or vehicle that allows the exchange of light and may also allow the passage of sound and sometimes air. Modern windows are usually glazed or covered in some other transparent or translucent materia ...
which displays content independent of its container, with the ability to load content independently. The
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
or media elements shown in a frame may come from a different
web site A website (also written as a web site) is a collection of web pages and related content that is identified by a common domain name and published on at least one web server. Examples of notable websites are Google, Facebook, Amazon, and Wikipe ...
as the other elements of content on display, although this practice, known as framing, is today often regarded as a violation of same-origin policy. In
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
, a frameset is a group of named frames to which web pages and media can be directed; an iframe provides for a frame to be placed inside the body of a document. Since the early 2000s, the use of framesets has been considered obsolete due to usability and accessibility concerns, and the feature has been removed from the
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
standard.


Tags and attributes

The frames in HTML are created using the tag pair. The tag is a container tag for all other tags that are used to create frames. The tag replaces the tag in frameset documents.The tag defines how to divide the window into frames. Each frameset defines a set of rows or columns.  If user define frames by using the rows attribute then horizontal frames are created. If user define frames by using cols then vertical frames are created. The </code> element may be included so web browsers with frames disabled (or browsers that do not support frames) can display something to the user, as in this example: <syntaxhighlight lang="html4strict"> <frameset cols="85%, 15%"> <frame src="http://www.example.com/frame_1.html" name="frame_1"> <frame src="http://alt.example.com/frame_2.html" name="frame_2"> <noframes> Your browser does not support frames. <a href="http://www.example.com/frame_1.html">Click here</a> to view frame 1. <a href="http://alt.example.com/frame_2.html">Click here</a> for frame 2. Framesets have a border attribute. If set to an integer greater than 0, the user can resize the frames by dragging this border, unless a noresize attribute is present in a frame element. If border is set to 0, no border will be displayed and content in different frames will abut each other without delineation. The iframe element is used inline within a normal HTML body, and defines the initial content and name similarly to the frame element. Any text inside an tag pair will be displayed in browsers that do not understand the iframe tag.


History

Netscape Navigator Netscape Navigator was a web browser, and the original browser of the Netscape line, from versions 1 to 4.08, and 9.x. It was the flagship product of the Netscape Communications Corp and was the dominant web browser in terms of usage share in ...
2.0 introduced the elements used for frames in March 1996. Other browser vendors such as
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple fruit tree, trees are agriculture, cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, wh ...
with
Cyberdog Cyberdog was an OpenDoc-based Internet suite of applications, developed by Apple Computer for the Mac OS line of operating systems. It was introduced as a beta in February 1996 and abandoned in March 1997. The last version, Cyberdog 2.0, was r ...
followed later that year. At that time, Netscape proposed frames to the
World Wide Web Consortium The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 and led by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working to ...
(W3C) for inclusion in the HTML 3.0 standard. Frames were used to display and navigate early
online magazine An online magazine is a magazine published on the Internet, through bulletin board systems and other forms of public computer networks. One of the first magazines to convert from a print magazine format to being online only was the computer magaz ...
s and
web apps A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection. History In earlier computing models like client-serve ...
, such as
webmail Webmail (or web-based email) is an email service that can be accessed using a standard web browser. It contrasts with email service accessible through a specialised email client software. Examples of webmail providers are 1&1 Ionos, AOL Mail, G ...
services and
web chat A web chat is a system that allows users to communicate in real-time using easily accessible web interfaces. It is a type of Internet online chat distinguished by its simplicity and accessibility to users who do not wish to take the time to insta ...
sites. Frames had the advantage of allowing elements to be displayed sitewide without requiring server features such as
server-side include Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the World Wide Web. It is most useful for including the contents of one or more files into a web page on a web server (see below), using ...
s or CGI support. These features were not common on early web servers accessible to the public. Early websites often used a frame at the top to display a banner which could not be scrolled away. These banner frames sometimes included the site's logo as well as
advertising Advertising is the practice and techniques employed to bring attention to a product or service. Advertising aims to put a product or service in the spotlight in hopes of drawing it attention from consumers. It is typically used to promote a ...
.
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages. It mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, prior ...
, intended as a successor to HTML 4, removed all frames in 1.1. The intended eventual replacement was
XFrames XFrames is an XML format for combining and organizing web based documents together on a single webpage through the use of frames. Similarly to HTML Frames, XFrames can be made useful through its power to create a content frame that is scrollable wh ...
, which attempts to solve the problem of addressing a populated frameset through composite URIs. The later
HTML5 HTML5 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
standard, which took a different approach from HTML 4, also removes framesets. The iframe element, however, remains, with a number of " sandboxing" options intended for sharing content between sites.


Advantages

By allowing content to be loaded and navigated independently, frames offered several advantages over the plain HTML in use when they were first developed: * Simplifying maintenance of content shared across all or most pages, such as navigation data. If an item needs to be added to a sidebar navigation menu, the web page author needs to change only one web page file, whereas each individual page on a traditional non-frameset website would have to be edited if the sidebar menu appeared on all of them. * Reducing the amount of bandwidth needed by not re-downloading parts of the page which had not changed. * Allowing several pieces of information to be viewed side by side, with the ability for each section to be scrolled independently. This might include the side-by-side comparison of two pictures or videos, or two different ways to understand something, such as an independently scrolling page of text next to video, images, animation, 3D rotating objects, etc. * Allowing footnotes or digressions to appear in a dedicated section of the page when linked to, so that the reader does not lose their place in the main text.


Criticism

The practice of framing HTML content led to numerous criticisms, most centering on
usability Usability can be described as the capacity of a system to provide a condition for its users to perform the tasks safely, effectively, and efficiently while enjoying the experience. In software engineering, usability is the degree to which a soft ...
and
accessibility Accessibility is the design of products, devices, services, vehicles, or environments so as to be usable by people with disabilities. The concept of accessible design and practice of accessible development ensures both "direct access" (i. ...
concerns. These include: * Framing breaks the identity between the content and URL as displayed in the browser, making it difficult to link to or bookmark a particular item of content within the frameset * The implementation of frames is inconsistent across different browsers *Browsers which render material linearly do not handle frames well. **
Screen reader A screen reader is a form of assistive technology (AT) that renders text and image content as speech or braille output. Screen readers are essential to people who are blindness, blind, and are useful to people who are visual impairment, visually ...
programs **text or audio browsers **
Email Electronic mail (email or e-mail) is a method of exchanging messages ("mail") between people using electronic devices. Email was thus conceived as the electronic ( digital) version of, or counterpart to, mail, at a time when "mail" meant ...
browsers such as
Agora The agora (; grc, ἀγορά, romanized: ', meaning "market" in Modern Greek) was a central public space in ancient Greek city-states. It is the best representation of a city-state's response to accommodate the social and political order of t ...
**
Mobile browser A mobile browser is a web browser designed for use on a mobile device such as a mobile phone or PDA. Mobile browsers are optimized to display Web content most effectively on small screens on portable devices. Mobile browser software must be sma ...
s * Framing complicates
web indexing Web indexing, or internet indexing, comprises methods for indexing the contents of a website or of the Internet as a whole. Individual websites or intranets may use a back-of-the-book index, while search engines usually use keywords and metadata to ...
and can be detrimental to
search engine optimization Search engine optimization (SEO) is the process of improving the quality and quantity of Web traffic, website traffic to a website or a web page from web search engine, search engines. SEO targets unpaid traffic (known as "natural" or "Organ ...
. * Framing confuses the boundaries between content on different servers, which raises issues of copyright infringement * Visitors arriving from search engines may land on a page intended for display in a frame, resulting in the visitor having no way to navigate to the rest of the site * Frames change the behavior of the back button. * Users usually do not expect browsers to print frames the way they do. * External links on web pages which use frames may cause other pages to appear in the frameset, since the default behaviour for a link is to load in the current frame if the author does not specify otherwise. This could be used by unscrupulous webmasters to make it appear as though content from another site was actually part of the site hosting 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 did not require a scrollbar; **using fluid design characteristics in target pages instead of fixed designs, so that the content would not cause horizontal scrollbars in the first place.


Alternatives

As web technology developed, many of the purposes for which frames were used became possible in ways that avoided the problems identified with frames. *
Cascading Style Sheets Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone techno ...
(CSS) allowed elements of a page to be scrolled independently (using the overflow property) or held on screen while other content is scrolled (using position:fixed) * Server-Side Includes allowed shared content to be edited once and automatically delivered to the client as part of a finished page; as server CPU and connection speeds increased, the extra work required to do this on the fly became a lesser consideration. * CGI and web-oriented
scripting languages A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled. A scripting ...
and
web development Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications ...
frameworks such as
PHP PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by The PHP Group ...
and
Active Server Pages Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages. It was first released in December 1996, before being superseded in January 2002 by ASP.NET. History Initially released as an add ...
, as well as database-backed
Content Management System A content management system (CMS) is computer software used to manage the creation and modification of digital content (content management).''Managing Enterprise Content: A Unified Content Strategy''. Ann Rockley, Pamela Kostur, Steve Manning. New ...
s such as
WordPress WordPress (WP or WordPress.org) is a free and open-source content management system (CMS) written in hypertext preprocessor language and paired with a MySQL or MariaDB database with supported HTTPS. Features include a plugin architecture ...
, provided much richer options for maintaining content and providing navigation. *
Client-side scripting A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, and includi ...
and
Dynamic HTML Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts (JavaScript, VBScript, or any other supported scripts) that enabled the creation of interactive ...
allowed parts of a page to be visually replaced based on a user's actions. This allowed much more flexibility for showing "side" content, such as footnotes or instructions, as these could now be displayed and hidden anywhere on the page rather than requiring a pre-defined frame. *
AJAX Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Greek ...
allowed for dynamic display within a page of content even when it needs to be fetched from the server, for instance based on the logged in user or events elsewhere.


See also

*
Copyright aspects of hyperlinking and framing In copyright law, the legal status of hyperlinking (also termed "linking") and that of framing concern how courts address two different but related Web technologies. In large part, the legal issues concern use of these technologies to create or fa ...
* Frames *
Inline linking Inline linking (also known as hotlinking, leeching, piggy-backing, direct linking, offsite image grabs) is the use of a linked object, often an image, on one site by a web page belonging to a second site. One site is said to have an inline li ...
*
Deep linking In the context of the World Wide Web, deep linking is the use of a hyperlink that links to a specific, generally searchable or indexed, piece of web content on a website (e.g. "http://example.com/path/page"), rather than the website's home page ( ...
* Framekiller * Tableless web design


References

{{Reflist, 2


External links


HTML Help: What's wrong with frames?



Script designed to prevent framing of your content
HTML Web 1.0