Question

I was going to have a left navigation panel which uses an ajax request to change the contents of the center panel of the HTML.

Should I use HTML frames or simply a "sidebar" DIV? Does it matter?

Was it helpful?

Solution

A div. You should pretty much never use frames. Doing so causes problems, which others have described.

OTHER TIPS

Many people argue against using frames: http://www.google.ca/search?hl=en&q=html+frame+problems

You should never use frames. That is very bad usability.
See "Avoid using frames" and Why Frames Suck (Most of the Time)

Load the content and bind it to the div. That's the best solution for dynamically updating a page.

jQuer.load
jQuery.post

If you're using Ajax, then an IFRAME makes no sense. On the other hand, using an iframe lets your user go back/forward between the pages he's visiting. But I don't understand what are your thoughts about linking together Ajax and an IFRAME. Google does this exactly for the purpose I mentioned a few lines above, to allow users to go backwards (no forward), but I don't know how they've implemented it.

Both approaches have drawbacks. Leaving the problems that are common to both aside for the moment:

  • Using frames gives you orphan pages.
  • Using Ajax means that it requires JavaScript support and locks out search engines from the content (except for the front page) entirely. It breaks the back button.

There are reasons why almost every side that implements common content on mutiple views just includes duplicates of the common content on every page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top