Reasons to Avoid Frames and iFrames

Here are just a few reasons to avoid using frames and iframes (inline frames). Other articles have been written in more detail that include other reasons.

Frames and iFrames... (in no particular order)

  1. make bookmarking individual pages difficult, or even impossible for less experienced users.
  2. can make navigation unavailable. Consider the situation where someone finds a page through a search engine. What happens if that page doesn't include the main navigation because you intended it to be viewed as part of another page that does include the main navigation?
  3. can make it more difficult for search engines to index your site since most pages won't include the main navigation.
  4. often add unnecessary scrollbars.
  5. break the refresh/reload button.
  6. can break the back and forward buttons.
  7. often take longer to load because of the additional HTTP requests.
  8. cause printing issues.
  9. are layout oriented instead of semantics (meaning) and structure oriented. How does one frame relate to another? You can't tell which role each frame plays (without loading the separate documents and analyzing them). Which is the main content? Which is a header? Which contains the main navigation?

I'm not saying that you should never use them. For example, they can be useful for admin panels. I'm just saying that the problems that they were developed to address are better addressed with server-side languages.

If you still aren't convinced, I strongly recommend that you read the articles that I've listed below.

Related Links:

Last update: 2009-07-08