Frames & Framed Sites
This was probably one of the first lessons that I learned when building sites. Frames, though very useful at times, absolutely murder your sites ability to get crawled and indexed properly. If you insist on creating a framed site, may I at least suggest that you take advantage of the
<noframe> tag to create a little something for the search engines as well. Looke at the code below:
<TITLE>My Framed Site</TITLE>
<FRAME name="navigation" target="main" src="navi.html">
<FRAME name="main" src="home.html">
The sample code above is a simple example of the homepage of a framed site. Not very much content there, right?
I’m not going to get into all the things that can go wrong with a framed site, but let’s say that a search engine does spider the homepage and, lets just say for arguments sake that it also crawls the navi.html file (used for the sites navigation). So now, when the site is indexed, we have the homepage (with no specific content on it – just a page title) and we have the individual navi.html file – outside of the frameset, by itself. What’s the problem, at least its indexed, right? Wrong. The navi.html file is meant to be displayed in a 250 pixel wide column down the left hand side of the site – if it gets indexed, it will be displayed in a full window. When I click on links in the navi.html file, they are supposed to refresh the content in the “main” frame of the site, but rather now, they’ll just take me to a new page – a page in which I will most likely not have any navigational elements because this page is meant to be displayed in the “main” frame, with the navigation in a frame to the left. Instead, this page is now an orphan page with no links back to any other pages, or more importantly to the main frame page on the site.