Why should I not use HTML frames? [closed]

Although they solved a problem at the time they were created (updating part of a “page” while keeping in place a non-updating part), framesets were criticised in terms of usability pretty much from the start, as they break generic functions of the browser, such as:

  • bookmarking, and copy-and-pasting URLs to share
  • printing the page as displayed on the screen
  • reloading the page: since the URL has generally not changed, you will often be taken back to the site’s homepage or default frameset; manually reloading some frames is possible, but not obvious to the user
  • back and forward buttons are ambiguous: undo/redo the last frame change, or take you to the last time the URL bar changed?

The heaviest burden of avoiding framesets – including the same content on every page – is trivial to solve if you are using any server-side language to generate your HTML, even if all it provides is a “server side include”. Unlike framesets, a server-side include could occur anywhere on the page; building a site with a server-side scripting language or templating system has other obvious advantages too.

There is still an advantage to being able to update small areas of the page without reloading the entire content, which can be achieved via AJAX. This sometimes leads people to create interfaces with all the problems of framesets outlined above, but that is hardly an argument in favour of framesets. Again, a site built with well-designed AJAX functionality can achieve things which framesets don’t even begin to address.

Leave a Comment