Understanding Framed Websites
Framed websites are generally easy to spot; chances are you've used one and might not have known it. A framed website generally consists of numerous parts, starting with the frameset. As you've seen up to this point, browsers typically open one page at a time. When a site uses frames, this concept is no different. However, rather than opening numerous files at one time as you might think occurs with framed sites, a browser generally opens a frameset . The frameset is usually split into numerous frames that make up the content of the site in the frameset. Figure 8.1 shows a framed website in use.
Figure 8.1. The MSDN Library website is a classic example of a framed website.
[View full size image]

Figure 8.2. You can resize the frame to make the navigation tree easier to read.
[View full size image]

The Advantages of Frames
The advantages of setting up a website that uses frames can be profound. As you can see from the MSDN Library website, all elements that are constant throughout the web experience, such as the navigation menu at the top and left, do not have to be reloaded every time a link is clicked. This navigation structure exposes advantages for both author and user: From the author's viewpoint, if a navigation bar has to be changed (perhaps to add or remove a menu item) only one document has to be amended. If the navigation bars were integrated into each page (as would be likely if the page had been developed using tables), then every site document would have to be changed. From a user's standpoint, framed navigation menus result in much "lighter" documents compared to pages with static navigation menus because the pages don't contain the excessiv215 required to set up the table layouts. This can also be advantageous for users with dial-up modems, which by latest statistics, still average about 50% of Internet users. By having the navigation menu reside in a separate frame and new content appearing in a larger, autonomous frame, the site can appear more complete and loads quicker per navigation click. Accessing new documents and swapping them out of the same location saves download time and offers an easier navigation experience for the web user.In addition to the benefits presented thus far, the site is somewhat configurable. As you saw in Figure 8.2, the navigation frame can be resized by the user. Again, this is advantageous to both the developer and the user. From a developer's standpoint, you don't have to worry about limiting the size of your links to fit in the frame. From a user's standpoint, if the content in the navigation frame does exceed the size of the frame, you merely resize the border to expand the viewable area of that frame.Although the advantages presented are enough to convince anyone to want to use frames, there are numerous disadvantages. In fact, you'll see that the disadvantages far overshadow the few advantages we've looked at.
The Disadvantages of Frames
Along with the advantages frames can provide, they offer numerous disadvantages to the user and several challenges for the web designer. The most important of these challenges is search engine placement. Search engines use web crawlers and robots to index pages on websites. Crawlers are programs that wander from site to site, gathering information on web pages and returning it to the search engine for indexing. These programs often don't index frameset documents because framesets contain no content, only instructions to create frames, so there's little or nothing to index. Robots, however, do index documents with content, and when links to these appear in search results, the search-engine user is taken directly to the page, bypassing the frameset and ultimately the content (including the navigation aids) that was meant to be seen.Another disadvantage is bookmarks. Browsers bookmark only the frameset document on a framed website, not the pages showing in the frames. If you navigate through the MSDN Library site and try to bookmark particular pages, the bookmark points only to the relevant frameset and not to the page itself, so you'll never be able to bookmark the page you wanted unless you open it in a fresh browser window using the right-click context menu. To fix this problem, the MSDN website provides a link within the page itself. The Add to Favorites link shown in Figure 8.3 points to JavaScript code that allows the user to bookmark the frameset and the selected page.
Figure 8.3. Sites get around the bookmark issue in frames by creating their own link so that users can manually add the bookmark to the their favorites.
[View full size image]

Be Prepared
In very rare instances, I have developed sites that employ the use of frames. Generally, the framed sites I create are small Help websites that, when opened, provide a help interface for the application or website being used. For the most part, I stay away from using frames. In my experience they're more trouble than they're worth. A larger site generally results in rogue links with bad targets that end up breaking the page structure. Even worse, large sites that use frames become unmanageable and difficult to maintain. Now that modern web authoring tools such as Dreamweaver use templates and library items (as discussed in Chapter 15, "Working with Templates," and Chapter 16, "Working with Library Items"), the main advantage of frames from an author's viewpointthat framed navigation aids are low-maintenancehas disappeared.