Deciding whether to use frames
The most common use of frames is for navigation. A set of frames often includes one frame containing a navigation bar and another frame to display the main content pages.
However, designing with frames can be confusing, and in many cases you can create a web page without frames that accomplishes many of the same goals as a set of frames. For example, if you want a navigation bar to appear on the left side of your page, you can either replace your page with a set of frames, or just include the navigation bar on every page in your site. (Dreamweaver helps you create multiple pages that use the same layout; see About Dreamweaver templates.) The following image shows a page design with a framelike layout that doesnt use frames.
Many professional web designers prefer not to use frames, and many people who browse the web dislike frames. In most cases this dislike is due to having encountered sites that use frames poorly or unnecessarily (such as a frameset that reloads the contents of the navigation frames every time the visitor clicks a navigation button). When frames are used well (such as when theyre used to keep navigation controls static in one frame while allowing the contents of another frame to change), they can be very useful for some sites.
Not all browsers provide good frame support, and frames may be difficult for visitors with disabilities to navigate, so if you do use frames, always provide a
noframes section in your frameset, for visitors who cant view them (see Handling browsers that cant display frames). You may also want to provide an explicit link to a frameless version of the site, for visitors whose browsers support frames but who dont like using frames.
Advantages to using frames include the following:
Disadvantages to using frames include the following:
- Precise graphical alignment of elements in different frames can be difficult.
- Testing the navigation can be time-consuming.
- The URLs of the individual framed pages dont appear in browsers, so it can be difficult for a visitor to bookmark a specific page (unless you provide server code that enables them to load a framed version of a particular page).
- Understanding how frames and framesets work
- Handling browsers that cant display frames