HOME

TheInfoList



OR:

In the context of a
web browser A web browser, often shortened to browser, is an application 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 scr ...
, a frame is a part of a
web page A web page (or webpage) is a World Wide Web, Web document that is accessed in a web browser. A website typically consists of many web pages hyperlink, linked together under a common domain name. The term "web page" is therefore a metaphor of pap ...
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 ma ...
which displays content independent of its container, with the ability to load content independently. The
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
or media elements in a frame may come from a
web site A website (also written as a web site) is any web page whose content is identified by a common domain name and is published on at least one web server. Websites are typically dedicated to a particular topic or purpose, such as news, education, ...
distinct from the site providing the enclosing content. This practice, known as framing, is today often regarded as a violation of same-origin policy. In
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
, 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, concern for usability and accessibility has motivated diminished use of framesets and the
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
standard does not support them.


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="html"> <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 The 1990s releases of the Netscape (web browser), Netscape line referred to as Netscape Navigator were a series of now discontinued web browsers. from versions 1 to 4.08. It was the Core product, flagship product of the Netscape, Netscape Comm ...
2.0 introduced the elements used for frames in March 1996. Other browser vendors such as
Apple An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
with Cyberdog 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 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
(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 an online only magazine was the comput ...
s and web apps, 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. Additionally, many internet service providers (ISP) prov ...
services and
web chat Online chat is any direct text-, audio- or video-based (webcams), one-on-one or one-to-many ( group) chat (formally also known as synchronous conferencing), using tools such as instant messengers, Internet Relay Chat (IRC), talkers and possib ...
sites. Frames had the advantage of allowing elements to be displayed sitewide without requiring server features such as server-side includes 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 (business), product or Service (economics), service. Advertising aims to present a product or service in terms of utility, advantages, and qualities of int ...
.
XHTML Extensible HyperText Markup Language (XHTML) is part of the family of XML markup languages which mirrors or extends versions of the widely used HyperText Markup Language (HTML), the language in which Web pages are formulated. While HTML, pr ...
1.1, the intended successor to HTML 4, removed all frames. XFrames, the intended eventual replacement, provided the composite URI to address a populated frameset. The later
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
standard removed framesets by means differing from XHTML. The iframe element 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. * The main advantage to frames is that they enable parts of the page to remain stationary while other parts scroll. This is useful for elements you may not want to scroll out of view, such as navigational options or banner advertising. * Frames unify resources that reside on separate servers. For instance, you may use frames to combine your own material (and navigation graphics) with threaded discussion material generated


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 softw ...
and accessibility concerns. These include: * Framing breaks the identity between the content and
URL A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
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 blindness, blind people, and are useful to visually impaired people, Illiteracy, illiterate, ...
programs **text or audio browsers **
Email Electronic mail (usually shortened to email; alternatively hyphenated e-mail) is a method of transmitting and receiving Digital media, digital messages using electronics, electronic devices over a computer network. It was conceived in the ...
browsers such as
Agora The agora (; , romanized: ', meaning "market" in Modern Greek) was a central public space in ancient Ancient Greece, Greek polis, city-states. The literal meaning of the word "agora" is "gathering place" or "assembly". The agora was the center ...
**
Mobile browser A mobile browser is a web browser designed for use on a mobile device such as a mobile phone, PDA, smartphone, or tablet. Mobile browsers are optimized to display web content most effectively on small screens on portable devices. Some mobile bro ...
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 ( ...
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 search traffic (usually referred to as ...
. * 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.


Security

Frames create both technical and user-interface difficulties for enforcement of the same-origin policy. As an example of the latter, an outer page can trick a user into performing an action on an inner page (loaded using the iframe element) which has been made 99% transparent.


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 (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 In computing, a script is a relatively short and simple set of instructions that typically automation, automate an otherwise manual process. The act of writing a script is called scripting. A scripting language or script language is a programming ...
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 towards 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 a ...
, 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 web content management system. It was originally created as a tool to publish blogs but has evolved to support publishing other web content, including more traditional websites, electronic mailing list, ma ...
, provided much richer options for maintaining content and providing navigation. *
Client-side scripting A dynamic web page is a web page constructed at runtime (during software execution), as opposed to a ''static web page'', delivered as it is stored. A server-side dynamic web page is a web page whose construction is controlled by an application ...
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), ''Ajax'' (play), by the an ...
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 f ...
* Frames *
Inline linking Inline linking (also known as hotlinking, piggy-backing, direct linking, offsite image grabs, bandwidth theft, or leeching) is the practice of using or Embedding Rich Media, embedding a linked object—often an image—from one website onto a Web ...
*
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. "https://example.com/path/page"), rather than the website's home page ...
* Framekiller * Tableless web design


References

{{Reflist


External links


HTML Help: What's wrong with frames?



Script designed to prevent framing of your content
HTML Web 1.0