Advantages and Disadvantages of Frames
To use Frames or not to use Frames...
That is the question...
I've kept away from using frames in any of my work where possible. As much as I like some of the features that frames offer, such as a static header area and side menu bar, there is still a number of negative aspects to their use.
The idea of changing a menu system on my sites by altering one page is a very attractive prospect, especially now that I'm am carrying out a behind-the-scenes revamp of Taming the Beast.net . The weeks I have spent changing the coding on a couple of hundred pages could have been carried out in a couple of days, if I had used frames. But there are other ways to achieve rapid site updates without using frames (a subject of a future article) and those methods will be implemented in Taming the Beast.net Version II, due for release in December 2001.
So what are these frames (framed sites) anyway?
A frames page itself contains no visible content, it contains instructions on which pages to show simultaneously and how they will be displayed within the browser window . Think of it as a clear overlay, much like a paneled window frame - except this window frame allows you to look into different rooms of the house. A frames page can contain references to many other pages, but usually they consist of references to pages to be used as the header, the content, a left hand menu bar and a perhaps a footer bar. When a hyperlink is clicked in one frame, say the left hand navigation window, it will open a page in the content window, or the target frame.
This makes site-wide changes easy to implement (especially when used in conjunction with Cascading Style Sheets) as you can change the items such as the menu bar and logo for your site in one page, and that will update the entire site.
Using a frame for the header (top) area or navigation bar of your pages will also make it static (fixed) so visitors can easily access menus etc... no more scrolling back up the page.
All this sounds great, but there are a number of points you need to consider before implementing a framed site, especially when using WYSIWYG (What You See Is What You Get) web page editors .
1) Many search engines cannot index framed sites. Because the home page is merely a frame, with very little content or hyperlinks to follow, search engine spiders may stop dead on the page and have 'nothing to report'. A way around this is the proper implementation of Meta tags and use of the "noframes" tag. (See further resources at the end of this article)
2) If a search engine does manage to spider your site, visitors from search engines may land on the content pages, rather than the full-framed version, i.e. they may arrive on your site and all they will see is the menu bar! For a work-around for this issue, see further resources at the end of this article)
3) Non-frames capable browsers. Fortunately, only 1% of visitors browsers fall into this category. Once again the use of the 'noframes' tag will assist, but to be used effectively you basically need to create two sites, one framed, one not - the "time saving" is suddenly gone.
4) Bookmarking. A visitor cannot bookmark a specific page in your site without requiring additional customised scripting for each page. Even then there is a risk of visitors landing on the content frame, with no navigation frames to view.
5) Visitor opinion. Many find frames annoying.
6) Copyright issues. You'll need to ensure that all links within your site that point to external sources open in a new window to avoid copyright wrangles. There have been legal precedents in relation to this issue. Many site owners object to their content appearing in someone else's frame, to the point that special "frame busting" code is used.
7) Internal linking. Special attention will need to be paid to your internal links to ensure that any page pointing to, for example, the home page opens as a "whole page", otherwise the framed home page will appear in the target window, causing confusion to visitors.
8) Printing issues. Visitors need to take further steps within their print settings to ensure the information they want is printed correctly. In most cases, a full page cannot be printed as displayed on the screen, only in sections corresponding to the frame.
9) Scroll bars, divider bars. If your framed site uses a number of frames, scroll bars can prove to be unsightly. These can be removed, but check compatibility with other popular browsers. (See further resources at the end of this article)
10) External linkages to your site. If other sites wish to link to specific pages in your site, it is more difficult for them to do so.
11) Refresh/Reload problems. Again, special care needs to be taken with coding otherwise when a visitor tries to refresh a particular page, they may be taken back to the original frameset. A common problem.
It's a lot to consider; weigh up the pros and cons carefully. Instead of frames you could utilise a few lines of javascript code for quick global updates; learn more here:
Free Javascript to Dynamically update your website!
(http://www.devwebpro.com/2001/0928.html)
If you are a FrontPage user publishing to a FrontPage enable web server, the "Include Page" function is very handy and easy to implement. For others Server Side Includes (SSI) may also be an option. Neither of these options give you a static feature, such as frames do - but it can save many hours in global site updates. You can learn more about Server Side Includes here:
Free Server Side Include Tutorial:
(http://www.bignosebird.com/ssi.shtml)
If you decide to use frames, and have already implemented them, you may find the following links to frame tutorials useful in planning or editing your site:
Free Framed Site Tutorials:
An excellent, in depth examination of Frame coding issues:
(http://www.searchengineguide.com/spider-food/2001/frames.html)
Get the low-down on frames from a search engine authority:
(http://searchenginewatch.com/webmasters/frames.html)
About the Author
Michael is an Australian Information Technologies trainer and web developer. Many other free web design, ecommerce development and Internet articles, tutorials, tools and resources are available from his award winning site; Taming the Beast.net (http://www.tamingthebeast.net)
Find out how to get good rankings in the search engines if your site uses frames.
When it comes to framed sites and the effect that the use of frames by a site has on its search engine ranking, there are two schools of thought. Some people say that framed sites, if done properly, have no problems in getting good rankings in the search engines. Others claim that if search engine optimization is important to you, never use frames.
In my opinion, the truth lies somewhere in between. Yes, the use of frames does throw up a few issues when it comes to getting good rankings in the search engines which don't understand frames. Hence, when you are designing a new site, I would recommend that you avoid using frames, unless you have a specific reason for doing so. However, if you already have a site which uses frames, all is not lost. You can still get good rankings in the search engines even though you have used frames. Furthermore, using frames also has its own advantages when it comes to search engine placement, as we shall later on. This article assumes that you have a working knowledge of frames.
In case your site uses frames, the key to getting good rankings lies in using the NOFRAMES tag. The NOFRAMES tag is intended to help framed web sites display some content for those people who are using non frames enabled browsers. The search engines which don't understand frames also look at the NOFRAMES tag. Hence, if you are using frames, you need to add content to the NOFRAMES tag.
What you should do is to add a complete web page within the NOFRAMES tag. Ensure that this page repeats the important keywords for your site a number of times. Also, in order to ensure that the content within the NOFRAMES tag is as prominent as possible to the search engines, you should put the NOFRAMES tag right after the FRAMESET tag. However, don't put the NOFRAMES before the FRAMESET tag. If you do that, Internet Explorer will display your site correctly but Netscape will display the content present in the NOFRAMES tag, rather than the content present within the frames. Furthermore, you should also place a link to the page containing your navigation links in the NOFRAMES tag. This ensures that the search engines are able to spider the internal pages in your site.
Here's what the source code of your page might look like:
<html>
<head>
<title>Put an attractive title which contains keywords</title>
<meta name="description" content="Put an attractive description which also contains keywords">
<meta name="keywords" content="Your target keywords separated by commas">
</head>
<frameset border="0" cols="150,75%">
<noframes>
<body>
<h1>Heading containing keywords</h1>
<p>Here, you should add a lot of content and should repeat your keywords a number of times.
<p>More keyword rich text for the search engines.
<a href="left.html">Link to page containing navigation links</a>
</body>
</noframes>
<frame src="left.html" name="left" scrolling="no" noresize>
<frame src="main.html" name="main" scrolling="auto">
</frameset>
</html>
One problem that occurs when you use frames is that the search engines may often display one of the internal pages in your site in response to a query. If this internal page does not contain a link to the home page of your site, the user will be unable to navigate through your entire site. The solution, of course, is to add a link to the home page from that internal page. When the visitor clicks on that link, she is brought within the context of the frames.
However, simply adding a link to the home page presents yet another problem. If the visitor had already been viewing that page within the context of the frames and then clicks on the link to the home page, a new set of frames will be created in addition to the frames already being used. In order to solve this problem, you have to use the TARGET = "_top" command in the link, i.e. the HTML code for the link would be something like
<a href="index.html" TARGET = "_top">Go to our home page</a>
Wrapping things up:
As I mentioned earlier, there is also an advantage to using frames. Since most Internet users are now using frames enabled browsers, it means that not many people are going to know what's present in your NOFRAMES tag. This allows you the repeat your keywords a few more times in the NOFRAMES than what you could have done if you were writing a page which humans would also see (of course, don't repeat the keywords too many times - that can cause your web site to be penalized for spamming). You can also avoid using tables, graphics etc. which you would otherwise need to use if humans would also view that page. However, it is debatable whether this small advantage is sufficient to justify using frames.
|