views:

134

answers:

3
+4  Q: 

why frames are bad

i know they are, but my co-worker doesn't believe me. He keeps telling me that google cralws the inside content and caches it just fine. According to google, it does crawl them, but doesn't guarantee doing it properly.

Any thoughts why frames are bad for public web sites?

+4  A: 

Frames are more difficult to bookmark and, therefore, more difficult to share with others.
http://www.yourhtmlsource.com/frames/goodorbad.html

Rob
"Frames **disrupt the entire fundamental concept for the web**: a large collection of **individual pages**, linked together with hypertext." - ah, I knew there was something fishy with Ajax! :-)
Franci Penov
+2  A: 

IFrames (like HTML tables) are not bad. However, people were abusing them quite a lot, thus giving them the bad name.

IFrames do represent a good concept - single visual representation of documents coming from different sources, while keeping the DOM trees properly separated and isolated.

The problem arises when a script in one of the DOM trees needs to access the elements in another tree. Or when people want to reference the document location, which happens to be the URL of the root document, and fail to realize they need to location of the secondary document.

But the biggest problem with frames is that there are sites that want to encapsulated other sites in frame and trick the user to think they are interacting with the framed site, while in fact interacting with the outer one. This is the primary reason why most websites will employ some form of frame-busting scripts for their login pages.

Update: It's Friday and we need some fun, so here's the (obligatory) link to Jeff's post on frames-busting-busters-busting... :-)

Franci Penov
lol at "clickjacking"
gnomixa
+3  A: 

There are various usability and accessibility issues with frames:

  1. link can open in the frame it is enclosed in (e.g. a side pane);
  2. can break the forward/backward navigation;
  3. difficult to bookmark;
  4. are not easily searchable (likely to see the content in Google, etc.);
  5. break on browsers like links that are console/terminal based;
  6. difficult to size properly (e.g. consuming height on widescreen monitors for banner frames);
  7. can break with screen readers and magnifiers (for blind users and visual impaired users);

See http://www.angelfire.com/super/badwebs/ for an example of what not to do.

reece
hm, most of these apply to Ajax-enabled web pages as well, yet no one is screaming bloody murder. au contraire, Ajax is being considered the holy grail of web 2.0...
Franci Penov
I wouldn't compare ajax to frames, franci. Ajax is useful (database interaction, responsiveness etc), frames are rarely useful - the only benefit is the one listed by you regarding ads, but it's pretty miniscule if you ask me. i can't think of one other frames benefits. I haven't seen frames being used on any decent web sites. Again, use for ads is a minor thing. This discussion started with frames being used in a traditional way - menu, and inner content is inside a frame, which is bad, bad, bad.
gnomixa