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)
- make bookmarking individual pages difficult, or even impossible for less experienced users.
- 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?
- can make it more difficult for search engines to index your site since most pages won't include the main navigation.
- often add unnecessary scrollbars.
- break the refresh/reload button.
- can break the back and forward buttons.
- often take longer to load because of the additional HTTP requests.
- cause printing issues.
- 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.
- Who framed the web: Frames and usability
- Why are frames so evil?
- Frames - The Problems And Solutions: Explanations as to why you probably shouldn't use frames, along with alternatives that you can use instead.
- Why Frames Suck (Most of the Time)
- Frames or no Frames? - advantages, disadvantages and resources
- Frames are Evil