Web Page Design Boot Camp

  Home |  Basics |  Intermediate |  Advanced |  Tools |  Site Map    Subtopics:

The Trouble With Frames

All would have been well if web developers had stuck to using frames only for their intended purpose of being a navigational aid. Part of the problem is that some enterprising designers found other uses for them, many of which can make using a site difficult. Instead of sticking to frameset containing only two frames, they started dividing the screen real estate into three or more frames. They even created frameset that contained other framesets. Below is an example.

This HTML... Produces a frameset like this...
<html>
<head>
<title>Frame Sample #1</title>
</head>
<frameset cols="135,*">
   <frame name="menu" src="menu.html">
   <frameset rows="150,*">
      <frame name="topbar" src="banner.html">
      <frame name="main" src="stuff.html">
   </frameset>
</frameset>
</html>
menu topbar
main

This may not seem like a major obstacle, but if you start building pages and inserting links, it is all to easy to forget to tell the browser where the page should be loaded.

Another sticking point is how browsers work with framed documents. Some older browsers don't work with them. Trying to print a web document contained in a frame can be tricky if you don't know how or forget to tell the browser which frame to print.

A third problem is how search engines work with web pages that are part of a frameset. Many search engines use robot programs to search the web for content that can be reviewed for included in the search engine's database. If the robot finds a page of interest and adds to the database, a user may be stranded because the page contains only content without any navigation links. This may not be a major issue for smaller web sites, but for large ones contains dozens or hundreds of pages it can present a challenge. Users could have a difficult times finding their way to associated pages that would be but a mouse click away if the menu or navigation bar were included in the document.

The Verdict

Try to avoid using frames unless you have a compelling reason, such as preserving the safety of the free world, to do so.