|
useit.com |
| Search |
Judging from the email I receive, the most controversial statement I have made in my Alertbox columns so far was to make "the use of frames" one of the mistakes in my list of top ten mistakes in Web design.
For new or inexperienced Web designers, I stand by my original recommendation. Frames: Just Say No.
With respect to the use of frames by highly skilled Web designers, I have changed my opinion somewhat: people who really know what they are doing can sometimes use frames to good effect, though even experienced designers are advised to use frames as sparingly as possible.
Frames break the unified model of the Web and introduce a new way of looking at data that has not been well integrated into the other aspects of the Web. With frames, the user's view of information on the screen is now determined by a sequence of navigation actions rather than a single navigation action.
Navigation does not work with frames since the unit of navigation is different from the unit of view. If users create a bookmark in their browser they may not get the same view back when they follow the bookmark at a later date since the bookmark doesn't include a representation of the state of the frames on the page.
Even worse, URLs stop working: the addressing information shown at the top of the browser no longer constitutes a complete specification of the information shown in the window. If an author copies the URL in order to include it as a hypertext anchor in one of his or her own pages then that anchor will not lead readers to the desired view but to the initial state of the frameset. Similarly, if a user decides to send an email message to a friend with the recommendation to check out a page, then copying the URL from the browser will not work if frames are used since the URL points to the frameset and not to the current view (with the information of interest to the friend). Given that social filtering is one of the most powerful mechanisms for information discovery on the Internet, it is an utter disaster to disable the URL as an addressing mechanism.
<NOFRAMES> feature to serve alternate content to these users, but most designers don't bother designing two versions of their pages and reserve <NOFRAMES> for a "helpful" link to the download site for a frames-supporting browser version.
13% of users are still using Netscape 2 which had one of the worst usability problems to be seen on the Web so far: the BACK button in the browser simply didn't work with framed sites. The BACK feature is an absolutely essential safety net that gives users the confidence to navigate freely in the knowledge that they can always get back to firm ground. We have known from some of the earliest studies of user navigation behavior that BACK is the second-most used navigation feature in Web browsers (after the simple "click on a link to follow it" action). Thus, breaking the BACK button is no less than a usability catastrophe.
Combining these two statistics leads to the conclusion that more than a quarter of the users either can't see frames at all or can only do so while suffering severe usability problems. Even though many of these users will upgrade over the next year, there will probably still be about 10% left by the end of 1997. Remember that many people don't view Web browsing as a central part of their lives and therefore don't invest much effort in keeping up with the changing tools.
Thus, even if frames improve a design, they only do so for three quarters of the users, meaning that the improvement will have to be substantial to be worth the additional effort and the risk of aggravating the frames-poor quarter of the users.
comp.infosystems.www.authoring.html are filled with questions from Web authors who desperately need to know why their frames don't work as intended. Frames are currently so hard to learn that many page authors write buggy code.
TARGET="_top" attribute in their anchor tag (e.g., <A HREF=foo.html TARGET="_top"> ). Adding the _top makes the browser clear out all the frames and replace the entire window with a new frameset. The destination frameset may well have many frames that are identical to the ones in the departure frameset and will be cached in the browser, but by forcing a complete reload in principle, the browser gets a new URL for the destination. This means that navigation actions (e.g., bookmarking) work again and that the URL is available for other people to link to.
The only exception from the need to use a TARGET="_top" attribute
is when frames are used as a shortcut for scrolling within a single page. For example, a very long directory or other alphabetical listing could have a frame on top listing the letters of the alphabet. Clicking one of these letters would cause the listing to scroll within another frame while keeping the user on the same page and thus not destroying navigation.
Frames are also useful for "meta-pages" that comment on other pages. For example, a Web design styleguide may need to mix discussions of design principles with live examples of entire pages that follow (or break) the rules. In these cases, the embedded page should be treated as an embedded image (even though it is implemented as an independent page) and the "main" information that users will want to bookmark should be the content of the commenting frame.
Finally, it seems that the inline frames introduced in HTML 4.0 will be mostly harmless. A frame that is inlined will be subordinate to the main page, and the user can still bookmark the main page and navigate as usual. Since mainstream browsers still do not implement HTML 4.0, we don't know whether inline frames will have their own implementation problems: in particular, it is doubtful whether good ways will be found to print pages that have scrolling inline frames (my current best guess is that it will be best to print the currently visible part of a scrolling inline frame in order to maintain the layout of the main page, but some users may want to have the entire contents printed, so messy option settings may be necessary).
List of other Alertbox columns
If you still want to do frames after reading this column,
then check
Builder.com's
or
the Web Design Group's
frames-building tutorials for advice on how to do it with minimal damage.