MAMA: Frames
Index:
- Introduction
- MAMA's strategy for dealing with frames
- FRAMESET element
- FRAME element
- IFRAME element
- NOFRAMES element
- Frame-related attribute: Target
- Framed document MIME types
- Frames and Doctypes
- Frames and the W3C-Member List
Introduction
The frame layout concept for Web pages was first implemented in Netscape 2.0
in 1995. It allowed the browser window to be sub-divided into any number of
rows or columns of smaller, windowed documents. The concept has many
design and
usability problems,
and yet it is popular enough (and easy enough) that its usage has blossomed
over the years. Many authors and designers have a special place of fury in
their hearts for frames— a place where disdain for other reviled constructs
such as the BLINK
and MARQUEE
elements lives. The standards community codified common browser/author practice
with HTML 4.0, and this included frames functionality as well as inline frames.
However, in recognizing frames, the W3C also relegated it forever after to a special
DTD ghetto. Perhaps some day the standards community will embrace a different
concept similar to what frames accomplish. Nevertheless, the current version of
frames enjoys wide deployment "in the wild", despite its many drawbacks. Frames
defiantly maintain a degree of authoring inertia, despite the general disfavor.
Authors probably do not care enough about the arguments against frames to use
other alternatives—or else they just are not being original enough in coming
up with design alternatives. Despite being dropped in XHTML 1.1, frames are not
going to go away.
MAMA's strategy for dealing with frames
Documents containing frame-related elements are often quite simplistic—they
usually consist of some document HEAD
elements
followed by the frame markup structure. This alone does not accurately depict
all of the content that the browser is going to experience when accessing a
URL using frames. Each of the sub-frame URLs (specified by the Src
attribute of the FRAME
element) may have a very rich
markup experience that is not hinted at by the original frame structure document.
For example, if Javascript or Flash was only used in a sub-frame, the analysis
of the original frames page would not reflect that—even though the user would
experience the full aggregate of the features used in ALL of
the frames. Given the size of the analyzed URL set, it was not expected that
MAMA would be able to catalog and subsequently visit each of the sub-frames
individually in the timeframe available. To ensure that MAMA's analysis was as
close to the real-world experience as possible, a (debatable) design decision
was made to string together the content of the frames definition pages and the
content of all sub-frames into one long document for MAMA to analyze. Some of
MAMA's element counting statistics were inflated by this strategy, but it seems
to be a useful approach for the study to have adopted. There are certainly a few
drawbacks to this methodology—the overall view of the "document" can become
distorted unless steps are taken to allow for the changes. MAMA compensated as
well as it could by only using the originating frameset document as reference
for things like Doctype and other document metadata and ignoring any
corresponding information from the sub-frames.
FRAMESET
element
This element is used to create the layout grid of the sub-document frames, and
was encountered 378,033 times (10.77% of all MAMA's URLs). FRAMESET
specifies how the current document can be sub-divided into a grid of relative
or specific dimensions using the Rows
and
Cols
attributes, but neither of these attributes are
the most frequently used—that title belongs to the attribute Border
.
The primary reason for this is that a Rows
OR Cols
attribute is often used to
the exclusion of the other attribute. In spite of Rows
and Cols
being less popular than Border
,
the majority of URLs using the FRAMESET
element have
ROWS
and COLS
attributes
together in combination (203,575 times). The list of attributes below (Fig 3-1)
demonstrates a peculiar Web behavior: authors will dream up markup attributes and
pepper their code with them, whether they actually have an effect in any
browser. The only standards-legal attributes in this list are
Rows
and Cols
, and the others
are browser-extensions. The full MAMA attribute list shows that there were as
many as 24 other attributes detected for FRAMESET
(like
Cellpadding
, Spacing
and
Frameset
)...many of which are clearly erroneous and can
not possibly have an effect in any browser!
ELEMENT/Attribute | Frequency | ELEMENT/Attribute | Frequency | |
---|---|---|---|---|
FRAMESET | 378,033 | Marginheight | 8,210 | |
Border | 320,423 | Noresize | 6,238 | |
Rows | 310,679 | Scrolling | 5,522 | |
Frameborder | 301,851 | Leftmargin | 1,818 | |
Framespacing | 277,052 | Name | 1,810 | |
Cols | 268,482 | Topmargin | 1,791 | |
Bordercolor | 16,160 | Framecolor | 1,262 | |
Marginwidth | 8,331 | Framepadding | 1,189 |
FRAME
element
This element is used to specify the target object that will live in the frame.
It also gives direction for the individual frame's behavior. One would expect a
1-to-1 relationship between the usage of the FRAMESET
and FRAME
elements, but that is not quite the case—377,803 URLs used both of these elements at the same time, leaving 230
FRAMESET
-only URLs and 304 FRAME
-only
URLs. Attribute popularity follows standards-approved lines and is much more
uniform than for the FRAMESET
element. The
Longdesc
attribute, on the other hand, is poorly
represented and has never caught on.
Documents that use frames can point to other documents containing frames. It
is possible that an author could nest frames to an infinite depth, but in practice
the chances of that happening by design or accident are ... well ... pretty low.
How low? We are not exactly sure (yet), because MAMA only tried to detect the use
of nested frames— specifically the FRAME
element—in second-level framed documents and not beyond that. In all, 56,242 URLs were found
to have nested frames (14.88% of all URLs using frames). This seems like a
good starting point for further study if it seems warranted.
ELEMENT/Attribute | Frequency | ELEMENT/Attribute | Frequency | |
---|---|---|---|---|
FRAME | 378,107 | Border | 31,645 | |
Src | 377,986 | Framespacing | 18,098 | |
Name | 349,820 | Bordercolor | 8,203 | |
Scrolling | 312,463 | Topmargin | 5,366 | |
Noresize | 268,967 | Leftmargin | 4,626 | |
Marginwidth | 160,768 | Resize | 2,098 | |
Marginheight | 159,237 | Width | 1,121 | |
Frameborder | 118,858 | Longdesc | 643 | |
Target | 89,487 |
URLs using the most frames
The site MAMA found with the most Frame document references was http://www.iddic.com/index.html/ (URL no longer active) with 65 (Fig 4-2). It looks like this is not a unique case, as several URLs were detected to have more than 50 frames each. The average number of frames (when they ARE used) is 2.83.
URL | quantity |
---|---|
http://www.iddic.com/index.html/ (URL no longer active) | 65 |
http://www.cywu.org.uk/ | 63 |
http://www.markt-zell.de/ | 63 |
http://www.timiane.dk/index.htm/ | 52 |
IFRAME
element
This element creates an inline, or floating, frame in a document. Instead of
a document that only specifies the way other documents will live together in
a window, an IFRAME
is included within the normal
document flow, in much the same way an inline IMG
is used. In practice, many will be familiar with IFRAME
these days as a carrier for complex (and sometimes bothersome) advertisements
found on many websites. Src
is naturally the dominant
attribute here, with Frameborder
being (strangely)
slightly more popular than the more practical issue of specifying dimensions
for the IFRAME
(Height
and Width
). Usage of the Longdesc
attribute barely makes it into this list; its frequency is well below the
usages of many non-standardized attributes.
ELEMENT/Attribute | Frequency | ELEMENT/Attribute | Frequency | |
---|---|---|---|---|
IFRAME | 222,462 | Align | 29,256 | |
Src | 218,803 | Allowtransparency | 22,674 | |
Frameborder | 203,627 | Bordercolor | 8,534 | |
Width | 202,572 | Framespacing | 7,839 | |
Height | 202,147 | Noresize | 7,098 | |
Scrolling | 178,129 | Target | 5,308 | |
Marginwidth | 117,095 | Topmargin | 3,347 | |
Marginheight | 115,280 | Leftmargin | 3,228 | |
Name | 87,763 | Bgcolor | 2,434 | |
Border | 35,869 | Background-color | 914 | |
Hspace | 34,504 | Longdesc | 362 | |
Vspace | 34,383 |
How often IFRAME
s are used
The maximum number of IFRAME
references was an
astounding 769, with the average number for documents using IFRAME
being 1.51. The FRAME
and IFRAME
elements are not used in conjunction very often—only 19,472 cases out of
222,462 (8.75%).
Note:
Use caution accessing any of the
high-IFRAME
-quantity URLs mentioned in Fig 5-2:
some browsers may have problems with these extreme situations.
URL | Quantity |
---|---|
http://www.nbhqjx.com/ | 769 |
http://www.1000irani.com/ | 708 |
http://www.kramers-landhandel.de/shop/ (URL no longer active) | 386 |
http://www.pizza-juechsen.de/ | 385 |
http://www.anomaliesandquandaries.homestead.com/ | 134 |
http://www.kissnews.de/shop/start.html/ | 117 |
http://www.revelation13.net/movie.html/ | 107 |
http://www.trierer-orgelpunkt.de/ | 104 |
NOFRAMES
element
This element is for non-framed, fallback content. Only a browser that does not
understand frames or has frames functionality turned off will display the
content. It is considered good practice to use this element on any Web page
that is also specifying the use of Frames, and it was detected in 313,084 URLs—82.8% of the URLs using FRAMESET
.
Frame-related attribute: Target
According to HTML 4.01, there are only 5 elements that can carry the
Target
attribute: A
,
AREA
, BASE
,
FORM
and LINK
. The URLs
that MAMA analyzed used the attribute in a distressingly diverse list of
elements (25)! Elements with no business carrying this attribute, like
DIV
and OPTION
, occur
in quantities too frequent to be an accident. Looking at cases on the
standards-approved side of the fence, use of Target
with the A
element is far, far greater than the
general usage of frames would indicate. Authors are most likely concerned
with the frame situation their hyperlinks will end up in, so they take
steps to control it with the Target
.
ELEMENT | Frequency |
---|---|
A | 1,978,018 |
FORM | 199,085 |
BASE | 159,479 |
AREA | 146,703 |
LINK | 1,585 |
Target
attribute values
What sort of values does the Target
attribute use?
It has several reserved keywords, all beginning with the underscore character
("_"): "_blank", "_top",
"_self", "_parent" and
"_new". As expected, these values are the most
popular. Values resembling these keywords (such as "blank"
or "top") are also very popular, as are values which
stress the parent-child relationship of frame documents to their content documents
(including "main" and "contents",
and even German equivalents of the same: "hauptframe"
and "inhalt").
Target attribute value | Frequency | Target attribute value | Frequency | |
---|---|---|---|---|
_blank | 1,548,594 | mainframe | 31,691 | |
_top | 550,637 | google_window | 20,905 | |
_self | 306,182 | contents | 18,076 | |
_parent | 121,225 | hauptframe | 15,829 | |
_new | 84,293 | inhalt | 12,828 | |
main | 82,075 | content | 10,316 | |
new | 52,756 | top | 7,977 | |
blank | 43,287 |
Framed document MIME types
In the process of fetching the first-level frames of a document, MAMA tracked
the MIME type of the frames. Some file types were outright rejected before this
tracking could occur, based solely on file extension alone. The following file
extensions were not tracked but were probably not rare occurrences:
/\.(exe|mov|mp3|pdf|swf|wav|wma|wmv)/i
. After eliminating
those, the most popular values were almost all "text/html"
(by a very wide margin), with "text/plain" and an empty
MIME type also occurring with some frequency.
Note:
In the full
frequency table the overall total is much larger than the number of URLs
containing frames. This is because a URL can point to multiple frames at once.
Frames and Doctypes
HTML 4 and XHTML 1.0 have a special Doctype that is meant to be used when any
frame-related elements are used in a document. How do documents fare at actually
using these Doctypes? The answer is, "lower than the general population", but
the overall numbers are still not too bad: 129,190 of the 378,033 URLs using the
FRAMESET
element (34.17%) also use a Doctype—but not
so fast! Are these Doctypes specifying the frameset Doctype? Oops—that would
be a "no" just as often as it is a "yes": only 60,638 of the URLs that use the
FRAMESET
element (16.04%) use a frameset Doctype.
Frames and the W3C-Member List
Now, we can revisit the W3C-Member company list. If the use of frames is at odds with the standards and design folk, one would expect that usage by the W3C companies would be much less than the general population. That does seem to hold generally true at a quick glance. In our "The Wild" sample space of 3,509,180 URLs, 378,033 use frames (10.77%), and 222,462 use iframes (6.34%). In the W3C-company population, 14/429 use frames (3.26%), and 26/429 use iframes (6.06%). To harp on the Doctype issue again (because we can), only 6 of those sites using frames had Doctypes, with only two(!!) of those using the frameset Doctype.
This article is licensed under a Creative Commons Attribution, Non Commercial - Share Alike 2.5 license.
Comments
The forum archive of this article is still available on My Opera.