What are drawbacks to using Frames?

D

DesignerDave

Doing some personal, low tech web design for friends and family and I have
been told by quasi-experts that frames are no-no's. I can't really see that
there should be reason for not using in some cases. Thanks
 
J

Jim Buyens

Frames aren't necessarily evil. The MSDN Library uses them to good effect,
for example. Then again, MSDN has gone to a lot of trouble.

The biggest drawbacks are:

o When the site grows beyond eight or ten pages, it's no
longer easy to find all the links in your Frames menu.

o It's hard (requires JavaScript) to change the contents of
two frames at once, as when switching to a new menu in
one frame and a new content page in another.

o It's hard to link to a specific combination of target
pages. In most cases, you have to link to the
target page you want and let that page load. Then,
some JavaScript code in the target page has to
discover that it's been caught in public without its
frameset, and reload the frameset with itself as the
target.

This is more or less what happens when you browse

http://msdn.microsoft.com/workshop/author/dhtml
/reference/dhtml_reference_entry.asp

and it also requrires script code in the frameset.

o It's hard for Web visitors to bookmark anywhere in
your site other than the home page. They have to
right-click the frame they like and choose Add To
Favorites from there, or you have to give them a
special hyperlink that says Bookmark This Page or
whatever.

This presumes, of course, that you have each page
that might appear in a frameset programmed as
described in the previous bullet.

Other than all that, framesets are easy [sic].

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
M

Murray

I am down on frames because I believe that they create many more problems
than they solve.
Judging from the posts here, and the kinds of problems that are described,
the kind of person most likely to elect to use frames is also the kind of
person most likely ill-prepared fo solve the ensuing problems when they
arise. If you feel a) that you understand the problems and b) that you are
prepared to handle them when they occur, and c) that you have a need to use
frames, then by all means use them.

As far as I know, the most comprehensive discussions of frames and their
potential problems can be found on these two links -

http://apptools.com/rants/framesevil.php
http://www.tjkdesign.com/resources/frames/
 
C

Clark

For the type of sites you describe, having a single, always visible
navigation frame containing the links to the site pages can be very
useful and make the site easy to use.

If you were desiging a site that you expected folks to find using search
engines, and its main navigation bar / graphic were contained in a
frame, you get the problem that the search engines send people directly
to a page of your site, so it loads in their browser with the
navigation bar missing. In such a situation you have to take some
(usually somewhat undesirable from a site perfomance perspective)
mitigating steps

But for what you are describing -- frame away! At least, that's MHO.
 
M

Murray

In such a situation you have to take some (usually somewhat undesirable
from a site perfomance perspective) mitigating steps

This is the slippery slope. Frames are one workaround after another. Each
is a bit more tedious and unpleasant than the one before.

Look - if you can read and understand every point made in those previous
links I posted, then you have my permission to use frames. Unfortunately,
the people most likely to use frames are the ones least likely to understand
those points, and therefore dig themselves out of the numerous holes. My
opinion, of course.
 
D

DesignerDave

Thanks Murray,

I guess if I can strp drooling long enough to understand what you have told
me I won't use frames because I don't want to have to be prepared to solve
what problems may arise from the application of the technology.

Thanks again
 
C

Clark

Well, yes I have to agree with you. I have frames on a current site,
and I have to confess that if I started over, I would have jus t used an
include page for the top nav bar instead of a frameset, as most of my
clients find the site via search engines, and I have to redirect them to
the site home page because often they come into the site on a page
missing the frameset.

Actually, the only thing holding me back from converting to an include
page for navigation is that I dont want to mess up my reasonably ok
search engine rankings by changing things. :=(

Probably just overactive paranoia ---
 
C

Clark

Well the one useful thing about them is that they allow you to keep the
navigation menu always visible even when someone has scrolled down the
page, as you probably know. But, like everyone says, there's a lot of
baggage that comes with that virtue --
 
M

Murray

Yes. Why?

Well, in some (limited) cases, they may be EXACTLY what you need. I can
only think of four, however:

1. You need to have a sound file playing continuously during a site
session. The only way I know of to do this is to have a frameset with two
frames, one of which contains the sound file, and is 0 pixels wide/high, and
the other of which contains the rest of the site. Without this artifice,
the sound file would restart on each new page.

2. You need to have dynamic information displayed with a constant
navigation scheme of some sort (this is sometimes a stretch, as it's pretty
easy to do this without frames, too).

3. You need to obfuscate your URI. Since the frameset is always loaded in
the browser, the address field will always display the URI of the frameset,
while the URI from which the frame pages are loaded may well be quite
considerably different.

4. You need to reliably center your content both horizontally and
vertically on all browser/platform combinations. As far as I know, a
letterbox-type frame arrangement is the only way to achieve this. Note that
I said "RELIABLY CENTER", not "USUALLY RELIABLY CENTER". This means that
the invalid 100% table height code is not an option.

If your needs do not fall into one of those 4 categories, then you probably
should avoid frames altogether.
 
Top