tutorial home previous panel: <frame ...> next panel: <a href=... target=...> </a>

The Tags: <noframes> </noframes>

<noframes> ...

Frames-compatible browsers are supposed to ignore everything between the <noframes> and </noframes> tags. This makes it possible to give special consideration to viewers operating frames-disabled browsers. Usually, maintaining both a frames and non-frames version of a web site is a lot of work, so many web programmers just settle for the following warning message and abandon the remaining 2% that still use Lynx:

<noframes> <p> Warning! This document cannot be viewed without a frames-capable browser. We regret the inconvenience. </p> </noframes>

Unfortunately, current implementations of Netscape only recognize the <noframes> tags when they are contained by <frameset> tags. This is unfortunate, since the <noframes> tags might have made it possible to use the same body documents for both frames-compatible and frames-incompatible browsers. (See the section "Catering to Frames-Incapable Browsers" in the next lesson for information on how to do this.)

If you want your pages to be found and indexed by the popular search engines, then frames present somewhat of a problem. Although search engine technology is slowly being retrofitted to accomodate frames, many search engines robots simply do not know what to do with frameset documents when they find them. Many of them "see" a blank page and simply give up.

An ideal robot would simply follow the links contained in the <frame> tags, but many do not, either because they were designed before the advent of frames, or because the robot designers assumed you wouldn't want your framed documents being viewed outside of their framed context.

Suppose, for example, that your site usually presents two frames: a small navigation bar on the left side and the main content on the right side. Chances are, your content pages in the right frame won't include a whole lot of navigation links, since those links are already available in the left frame. So, after a search engine robot has scoured every body document on your site, it may begin pointing its customers directly to them, rather than your frameset documents from which they were meant to be displayed. The result is that incoming visitors will see your pages "out of context", which means not only that their browsing experience will be incomplete, but also that they may not be able to navigate through the rest of your site.

If this possibility doesn't bother you, or if you are adequate prepared to get around these problems using other means (there are a few tricks), then you should use the <noframes> tags to help the robots traverse your site. You can do it like this:

<html> <head> <title>My Page Title</title> </head> <frameset cols="100,*"> <frame name="navigation_bar" src="navbar.html"> <frame name="main_content" src="content.html"> </frameset> <noframes> <p> You are viewing a site that works best with frames enabled browsers. However, you can see the main frame by clicking <a href="content.html">here</a>. </p> </noframes> </html>

In this example, the noframes section serves three purposes:

  1. It ensures that frames-incapable browsers will see something besides a blank page. In this case, they get a message describing the frames requirement.
  2. It gives frames-incapable browsers a chance to view the main frame from the frameset.
  3. It gives robots a lead to follow so that your frames-savvy site will not be excluded from the seach engines.

You should also consider including a link to the navigation bar frame. The robots will love that, since the body document for your navigation frame probably contains links to all the rest of your site.

Next: The Tags: <a href=... target=...> </a>

[ menu | previous page | next page ]