Website Development - The pros and cons of Frames
Frames are a way to divide the main browser window into two
or more sections, each of which can display independent content. They are often used to
provide constant navigation menus (similar to our monthly tip homepage) but like most
things, there are pros and cons to using them. In our opinion, frames should be avoided
whenever possible. So, if you have to use them, here's how to make the most of frames.
Here are a couple of reasons you should avoid frames:
- Some people hate them
- Search engines don't like them
- Pages may be seen out of the frame context and become
"orphans"
Before we get into a discussion about these issues, we'll
take a quick look at how frames are coded in HTML.
<html>
<head>
<title>Why you should avoid frames when developing websites - most of the
time</title>
</head>
<frameset cols="167,*" frameborder="0">
<frame name="contents" target="main"
src="dmay2000-nav.htm" scrolling="never" border="0">
<frame name="main" src="dmay2000-1.htm" border="0">
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
The <frameset> tags identify
that frames are being used. The <frame> tags identify which pages are to be
displayed in each frame. You'll notice that the <frameset> tag comes before the
<body> tag does. You'll also notice that the <body> tags are surrounded by
<noframes> tags. This identifies the content that will be displayed in a browser
that doesn't support frames.
Frame Hatred
So, why would some people hate frames? As with any
programming feature, frames have been over-used in the past. When browsers initially began
to support frames, there were both good and bad uses of frames and they became a major
topic of discussion. Most people who have gotten onto the Internet in the past year or so
probably don't care as much as those who passionately debated this topic in the past. If
you implement frames properly in your website, you probably won't get any complaints.
Search Engines and
Frames
Some search engines are not able to follow the links found
within the <frameset> tag. This means that if you submit only your homepage to be
indexed by a search engine, chances are it will stop at your homepage. Below is the code
for a typical page using frames. This page exists online. Names have been changed to
protect the guilty.
<html>
<head>
<title>Your Company's Name Here</title>
</head>
<frameset cols="144,1*" frameborder="NO" border="0"
framespacing="0">
<frame src="/online/menu.htm" marginwidth="0"
marginheight="0" scrolling="NO" noresize
frameborder="NO" name="menu">
<frame src="/online/main.shtml" frameborder="NO" noresize
scrolling="AUTO" marginwidth="0" marginheight="0"
name="main">
</frameset>
<noframes><body bgcolor="#FFFFFF"></body></noframes>
</html>
You'll notice that aside from the information in the
document's title, there is no text for a search engine to index. Strike one against this
page. The authors also did not use META tags for keywords or descriptions. Strike two.
Considering that the links in this page can't be followed by many search engines, the
likelihood of this website being well represented in the search engines is minimal. Strike
three - you're out.
Making Pages Search Engine
Friendly
While the example above is typical, you don't have to make
the same mistakes. See the <noframes> </noframes> tags near the end?
Information contained between those tags is displayed to users who are not using
frames-capable browsers. Search engines also read that information, so it is a great place
to put text containing your keywords and links to other pages that search engines CAN
follow. While this technique can solve some of your problems, it can create others.
Orphan Pages
Imagine you've found a great webpage in the search engines
but it has no links to other pages. What do you do? If you're like most people, you hit
the back button and go to another site looking for the information. This is the fate of
the "orphan" page. Orphans are usually created when site developers use a frame
for the navigation of a site. The assumption is that everyone who visits the site will go
to the homepage. If that is true, then all of the pages of the site will be displayed in
the correct frame context. Since most conscientious website developers submit all of the
pages of their sites to the search engines, there is a chance that a sub-page of the site
will be ranked higher than the homepage and will appear in the top listings. If this page
is visited, it will be displayed on its own without its accompanying navigation frame.
Orphan pages are of no value to your visitors.
Reuniting Orphan Pages with Your
Site
The problem with orphan pages is the lack of links to the
rest of your site. This is easily remedied by adding a link to your homepage. Visitors
will then be able to see your site the way you meant them to see it.
To Frame or Not to Frame
As with most things, there are two sides (or more) to every
discussion. Since we're fans of never saying never, here are our final suggestions
regarding frames:
- avoid them when possible
- if you're going to use them, provide links from all pages to
your homepage to avoid orphan pages
- remember to provide text and links in the <noframes>
area for the search engines to index
Internet
Marketing | Website
Development | Web
Hosting | Portfolio
Internet Marketing
Articles | Contact
Us | Privacy Policy | Home
Contact The Web For Business.com
at the following co-ordinates:
4 Conroy
Crescent, Thorold, Ontario L2V 4R3
Tel: 905-227-6667
Fax: 905-227-6668
Contact Us

Developers of The Niagara Guide Network