Frame (HTML)

from Wikipedia, the free encyclopedia

A frame is a section of an HTML page in which another HTML page can be transcluded . The individual segment is referred to as a frame, the definition of all frames as a frameset.

The frame technology was introduced by Netscape in Navigator 2.0 and is still supported by most browsers today . The W3C had standardized framesets in the versions HTML 4.0 and XHTML 1.0.

The frame technology was not adopted in HTML5 .

use

Frame examples

Many experts in the field of usability ( usability ) do not recommend the use on frames.

advantages

One advantage is the possibility of displaying several individual documents in parallel. This allows the amount of data transferred from the web server to the web browser to be reduced and a modularization of a website without server-side technologies is possible. For example, the navigation can be managed centrally in an HTML document and does not have to be inserted on every new page.

Another advantage is that only the current frame is scrolled , while other frames are unaffected. For example, a content frame can be scrolled, while the navigation and other important areas in the respective frame do not scroll with it.

Another advantage is that frames can be used to easily combine content from different sources or from different web applications . For example, results from a web application could be displayed in one frame in another frame.

disadvantage

No longer included in HTML 5

The W3C has not adopted the frame technology in HTML5. A warning is issued against further use:

“Avoid using it and update existing code if possible; ... Be aware that this feature may cease to work at any time. "

"Avoid using it, and if possible, update the existing code ... Note that this feature may stop working at any time."

- mozilla.org

addressing

Normal HTML pages only have one address with which they can be reached. However, frames consist of several sub-pages, whereby the address of the frame definition (the frameset) is usually displayed in the browser, which usually does not change when you switch to another sub-page. If someone wants to link a certain subpage, set a bookmark on it or indicate it in an e-mail, he is usually faced with a dilemma. If he links the frameset, the start page defined in the frameset is loaded instead of the desired subpage. If he specifies the direct address, the other components of the page, such as the navigation, are missing. This is confusing, especially for technically inexperienced users who are used to the basic principle of "one address = one page".

However, this problem can be circumvented to some extent by means of JavaScript , since JavaScripts can recognize whether a page is loaded in the frameset or not and can thus react accordingly to reload the frameset.

Collection by search engines

Also, search engines have trouble with frames. Although they usually record the content on frame sub-pages and link them, the findability of the homepage of the website suffers. This is because frameset documents have no relevant content.

Accessibility

Frames are a problem, especially when using screen readers to read out the content displayed by the browser, since users can only orientate themselves between the individual frames using their names. Older screen readers, for example those that only work with the Lynx browser or other text browsers, could not display frames, more modern programs can work with most current browsers, so frames are no longer a technical hurdle.

Approval of other websites

It is possible to integrate an external website into your own frameset. However, this is usually not welcomed by the website operator concerned. There have already been several court rulings on this, the Düsseldorf Regional Court saw framing from external sites as permissible, while the Regional Court in Steyr ( Austria ) saw the integration of external sites in its own frameset as an anti- competitive factor . In the case of inline framing, the Court of Appeal believes that third-party copyrights and ancillary copyrights must be observed, which is why it is not, for example, readily permissible to include third-party map material by way of framing. Insofar as the framing leads to an increased volume of data transfer, liability from the point of view of encroaching on the law of the established and exercised commercial enterprise comes into question. The Federal Court referred the matter to the copyright admissibility of the framing in May 2013 European Court of Justice for a decision.

You can prevent the integration of your own website in a frameset using JavaScript , similar to the addressing problem . Such JavaScripts are also known as frame killers or framebusters . Example source code:

<script type="text/javascript">if (top!=self) top.location.href=self.location.href;</script>

Alternatively, the response header X-Frame-Options can be set in the web server , which ensures that the website is not displayed in a frameset at all ( X-Frame-Options "DENY") or only in a frameset that was delivered by the same web server ( X-Frame-Options "SAMEORIGIN"). In the case of shared hosters where access to the web server configuration is not possible, the response header can also be set in the .htaccess file ( ) if they use Apache as web server software "Header append X-FRAME-OPTIONS DENY".

Alternatives

An alternative to HTML frames are the inline frames, which function according to a similar principle .

With different techniques, all the advantages of frames can be realized differently today. Server-side technologies, such as server-side includes , can be used to ensure that page sections such as the menu are maintained centrally in one place, but can be integrated into any number of sub-pages. With Cascading Style Sheets parts can be made of an HTML document scrollable. Using Ajax , it is possible to reload data from the server and use it to redesign the page.

Web links

Individual evidence

  1. HTML5 differences from HTML4 - obsolete elements . W3C Working Group Note 9 December 2014 (English)
  2. developer.mozilla.org: frames
  3. SelfHTML: Load file dynamically into frameset ( Memento from July 21, 2009 in the Internet Archive )
  4. Jan Eric Hellbusch: Barrier-free web design - The use of frames . Retrieved November 20, 2010
  5. ^ LG Düsseldorf, judgment of April 29, 1998 , Az. 12 O 347/98, Frames I, full text.
  6. LG Steyr, preliminary injunction of June 28, 2002 ( Memento of the original of February 3, 2009 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. , Az. 26 Cg 58 / 02b, full text. @1@ 2Template: Webachiv / IABot / www.linksandlaw.de
  7. KG Berlin, judgment of March 21, 2012 , Az. 24 U 130/10, full text.
  8. I ZR 46/12