Of all the of websites on the net there are many of
them that use frames in some capacity or another. I've been to many of
them and I stop and check the code to see if there done right. Yes,
there is a Right way to use frames, however, if done wrong frames can
be your worst mistake. Let me explain.
When you use frames it poses
some problems for you, the search engines and ultimately your
search engine positioning. There are trade offs that you have when you
use frames and just a couple of them are listed here.
1. Sites that use frames are harder to build. They have to be perfect
or you'll have pages that you don't want displaying in the wrong place.
2. You lose valuable screen space, the more frames and scroll bars the
less working area you have.
3. They are confusing to the novice user to bookmark and print.
When a user tries to bookmark or print a page on your site and maybe a
certain product they may bookmark or print just your header, footer or
menu depending on what frame they have selected at the time. This
alone could lose you a sale and a maybe a new customer.
4. Believe it or not there are still people surfing the net with non-frames browsers and many cases
webmasters build a No Frames version anyway or at minimum have to put full navigation on the framed pages.
5. They pose a major technical problem with search engines. To date
there are very few search engines that know how to handle frames correctly. But what about all the other ones? When they crawl your page,
what do they see? If your site uses frames, you can find out here what your page looks like to the search
engines here. http://www.anybrowser.com/EngineView.html
If you visited the above site and didn't like what you discovered, read on. You can overcome
the way search engines look at your site. First, your frames page should have
a NOFRAMES section with a referring link to a Contents page or Site Map, that will
have a link to every page in your website.
Your page HTML code should look
something like below. You could also embed in the NOFRAMES section another whole page,
but go easy because this adds to the load time of your pages.
The defacto standard has been to just put a note in the noframes
section saying that "Your browser does not support Frames" and leaving
the viewer no choice but to use the BACK button. However if you put in
this section a reference to a contents page that the browsers and
engines can follow (as above), they will bypass the frame and index
all the pages on the contents page.
6. You have to (or you should) put full navigation controls on each
and every page any ways, just in case someone comes into your site
through the back door (and they will). What I mean by this is someone
loading a page with out the frames page and if they do they will not
have any navigation on the page and thus don't see the rest of your
site.
Now there is a way around this also, it's called JavaScript.
By putting the code below in the head section of your pages (except your frames page) you can insure that 99%
of users will load your frames page. The only way they won't is if they have their Java turned off or they
have a non-java compatible browser. What this script does is checks to see if the page is inside a frame or
loaded by itself, if it is it will instantly load the Frames information.
Put this code in the head of your pages and change the index.html to
the name of your main frames page.
<script language="JavaScript">
<!-- if (top == self) self.location.href = "index.html";
// --> </script>
If you need a script that has a time delay, built in, use the
one below written by i4Market. The only 2 variables that you'll need to set is the redirect page and the time
delay, both indicated in red. The time delay is in 1/1000's of a second, so a setting of 2000 would be 2 seconds.
You can also put this script anywhere inside or outside of your HTML code.
The reason we are using JavaScript here instead of a fast meta-refresh
is simple, search engines penalize pages that use a meta-refreshes
and the meta tag itself cannot determine if it's in a frame or not.
Now I am not saying
that Frames are bad, and in some case they are absolutely necessary.
In my professional opinion, frames are good if they are used
correctly, have a purpose, and add value to your site. I'll simplify
that for you. If you don't need them don't use them.
About the Author:
Robert Boilard is a professional developer, marketing strategist
and one of the principals' at i4Market, LLC. Since 1993 Robert has
been producing successful website and marketing campaigns for
companies from the 2 person office up to the Fortune 500's. Visit us
today! http://www.i4market.com
You are free to use
the articles in this area anyway you wish, all we ask is that the
Author information remain intact or you provide a check box for the
Author information. The articles enclosed are new per the date on the
page and are copyright of i4Market. i4Market here by grants
you all rights to reprint these articles in any fashion you desire.
Minor edits are permitted but major rewrites should be submitted to
the author before release. You are free to break articles in 2 parts
if required or link to any page (not graphics) with-in this website.
Thank You The
i4Market Team
|